Re: [gentoo-user] disaster recovery - planning

2017-03-20 Thread Rich Freeman
On Mon, Mar 20, 2017 at 7:15 PM,   wrote:
> Besides standard "data" backup, if I was to plan for a disaster
> recovery; what to include in a backup system if I was to rebuild a new box?
>
> - /etc
> - /var/lib/portage/world
> - /usr/src/linux/.config
> - /var/spool/fax/ (if needed)
> - /var/www/localhost/htdocs/ (if needed)
> - crontab (users and root)
>

Here is what I'm backing up to the cloud via duplicity (where storage
is expensive so I have a more selective set of rules here):
--include /boot --include /usercache --include /etc --include
/data/www --include /data/home --include /root --include
/var/lib/samba --include /var/spool/tftp --include /var/lib/cdcat
--include /var/bind --include /usr/local --include
/var/lib/portage/world --include /data/diskless/gentooinst64 --include
/data/diskless/mythliv2 --include /var/lib/bitcoin/.bitcoin/wallet.dat
--include /var/lib/quassel/ --include /var/lib/ --include
/data/sstorage3/containers/mariadb/ --include
/data/sstorage3/containers/vpn/ --include
/data/sstorage3/containers/ddclient/ --include
/data/sstorage3/containers/dns/

(I realize that a lot of this references mountpoints that are useless
to you, but the end of the paths is probably good enough as a
checklist.  Yes, I realize a few of those are redundant, but I suspect
they might get around exclusions.)

My excludes for these more expensive backups contain things like:
www cache directories for some apps
Trash directories
NNTP client caches
Download directories
~/.cache
mail client caches (I use IMAP)
bitcoin blockchains
mysql data directory (I separately run mysqldump and back that up)
.snapshots on volumes that use zfs/btrfs
/usr and /var/log on my containers
Any random /tmp that would otherwise be caught

In general I try to stick stuff I want to back up in /home, and stick
stuff I don't want to backup elsewhere and just symlink it into /home
where needed.  The include/excludes just handle the random stuff where
this policy isn't practical.

Now, I also keep local backups of everything and the rules are much
more inclusive there.  I just exclude things like /sys, /proc,
anything with a bind mount (so as to not save it twice), /usr/portage
(changes constantly, trivial to restore), all those .snapshots
directories, and the same sorts of things in chroots (but not
containers).

As far as the suggestion to use ansible/etc goes for things like /etc
- I certainly agree it is a best practice.

-- 
Rich



Re: [gentoo-user] disaster recovery - planning

2017-03-20 Thread Alec Ten Harmsel


El 20/03/2017 a las 05:15 p. m., the...@sys-concept.com escribió:

Besides standard "data" backup, if I was to plan for a disaster
recovery; what to include in a backup system if I was to rebuild a new box?

- /etc
- /var/lib/portage/world
- /usr/src/linux/.config


These three should be pushed out with a configuration management 
tool/system like Salt or Ansible in my opinion and committed in a git 
repo instead of being backed up.



Alec



Re: [gentoo-user] disaster recovery - planning

2017-03-20 Thread Heiko Baums
Am 21.03.2017 um 00:15 schrieb the...@sys-concept.com:
> Besides standard "data" backup, if I was to plan for a disaster
> recovery; what to include in a backup system if I was to rebuild a new box?
> 
> - /etc
> - /var/lib/portage/world
> - /usr/src/linux/.config
> - /var/spool/fax/ (if needed)
> - /var/www/localhost/htdocs/ (if needed)
> - crontab (users and root)
> 
> What else did I miss?

/home (I guess that's what you mean with standard "data" backup)
/usr/local
/root
/usr/share/fonts (if needed)

Actually I would make a backup of the whole system excluding those
directories:

lost+found/
/dev/
/media/
/mnt/ (depends)
/proc/
/run/
/sys/
/tmp/
/var/export/
/var/run/
/home/*/.gvfs/

Heiko



[gentoo-user] disaster recovery - planning

2017-03-20 Thread thelma
Besides standard "data" backup, if I was to plan for a disaster
recovery; what to include in a backup system if I was to rebuild a new box?

- /etc
- /var/lib/portage/world
- /usr/src/linux/.config
- /var/spool/fax/ (if needed)
- /var/www/localhost/htdocs/ (if needed)
- crontab (users and root)

What else did I miss?

-- 
Thelma