Am Tue, 21 Mar 2017 01:34:04 +0100
schrieb Heiko Baums <li...@baums-on-web.de>:

> 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/

I'm using btrfs with subvolumes: Everything in one filesystem (I have
separate subvolumes for non-distribution related data, like /home,
or /var/log, /boot etc).

This makes backup easy: I simply mount the root subvolume which
contains everything under /mnt/btrfs-root and backup this. This
automatically excludes the various runtime mounts like /proc or tmpfs,
or net mounts. Plus, it preserves the static /dev delivered by the
rootfs deployment of your distribution (and also the various .keep
files for important mount points). Before backup, I also dump the
subvolume list to a text file.

You can get something different by bind-mounting your volumes into a
directory especially for crafting the backup. Just
make /mnt/system-backup and bind mount / and /home there (and other
system parts you exported to separate partitions). That way, runtime
and network mounts are not visible there and you get a perfect and
clean backup without the hassle of creating a pile of unmaintainable
and always incomplete (and maybe even error-prone) exclude lists. Then,
maybe dump your mounttab or fstab to the backup root before starting
the backup process. That way, you can more easily recreate your
partitions before you restore, and get back a working fstab without too
much thinking.

-- 
Regards,
Kai

Replies to list-only preferred.


Reply via email to