On Mon, Mar 20, 2017 at 7:15 PM,  <the...@sys-concept.com> 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

Reply via email to