[AuckLUG] What to back up?
Kiirani
kiirani at gmail.com
Fri Jun 13 15:11:15 NZST 2008
> However, in the interest of learning, what root-level directories could one
> exclude safely in the knowledge that one would never need them in the event
> of catastrophic distro update or hard drive failure? /dev perhaps, or /tmp?
For me personally, /home, /var and /etc are the only majorly important
things. /home and /etc are obvious, config files and all personal
files. /var I like to keep because this machine runs apache, mysql
etc, so a lot of important stuff which I can't be bothered backing up
separately is in there. Those are the things I include for my daily
rdiff-backup.
As I'm not backing up /usr, and I use gentoo, I also exclude
/var/lib/portage and /var/db/pkg - last time I tried to restore those
to a new system it caused hell with my package manager.
Otherwise, when doing a *full* backup (including package manager and
installed programs), I've found that /proc /sys and possibly /dev
cause problems if you try to back them up while the system's running,
and anyway they should be filled automatically. /tmp, /var/tmp and
/usr/tmp are definitely unneccessary, and I also like to exclude the
sources portage uses to build packages, because they're huge and can
be re-fetched. Under other systems, there are probably .bin files or
something that aren't needed after installation that you could
exclude. I'm not really sure as I haven't poked at my debian properly
yet.
You can probably exclude /usr/src as well, depends how attached to
your kernel sources you are.
You definitely shouldn't NEED /sys, /proc, /dev, or /tmp to run the
system. Well, you might need to make the directories, I don't really
remember my last gentoo install, my system's quite stable now.. I
think udev automatically fills /dev up on startup.
My list in python form :
includes = {}
excludes = {}
# Things to include
includes['daily'] = [
'/home',
'/var',
'/etc'
]
includes['weekly'] = [
'/'
]
includes['monthly'] = [
'/'
]
# Things to exclude, must take precedence.
excludes['all'] = [
'/var/tmp',
'/tmp',
'/usr/tmp',
'/sys',
'/mnt',
'/proc'
]
excludes['daily'] = [
'/var/lib/portage',
'/var/db/pkg'
]
excludes['weekly'] = [
'/usr/portage/distfiles'
]
excludes['monthly'] = []
More information about the AuckLUG
mailing list