[TAG] Backup software/strategies
Rick Moen
rick at linuxmafia.com
Sat Jul 14 22:28:27 MSD 2007
Quoting Ben Okopnik (ben at linuxgazette.net):
> 1) New packages: I'm not at a point yet where I have all the packages I
> want installed, but I'm certainly past the half-way point; I'm probably
> installing one or two a week now, maximum. In any case, even if I lose
> those, it's just not a huge factor - I can always reinstall. Worst-case
> scenario: maybe 20MB worth of changes.
I would urge _not_ including (not-locally-modified) upstream packages in
one's backups -- because they are available at need directly from the
distro's Internet package mirrors. Instead, just back up a _list_ of
installed package that can later be used during a semi-automated restore
/ rebuild. E.g., on a Debian or similar system, include the following
command's output in your backup sets:
$ sudo dpkg --get-selections "*" > /root/selections-$(date +%F)
Also include maps of your partition tables:
$ sudo /sbin/fdisk -l /dev/sda > /root/partitions-sda-$(date +%F)
$ sudo /sbin/fdisk -l /dev/sdb > /root/partitions-sdb-$(date +%F)
[etc.]
If there's a need for quick restore / rebuild, install a minimal system
from installation media, then do:
# dpkg --set-selections < selections-[date string]
# apt-get dselect-upgrade
The above is taken from my own recipe for casual backups:
http://linuxmafia.com/faq/Admin/linuxmafia.com-backup.html
I realise that you might be saying "Wait, I don't want to have to
re-fetch all of my packages from Internet package mirrors over my very
slow Net connection." OK, but having a full CD set of your preferred
distro handy for reinstallations is still a better solution than
including unaltered upstream package contents in your system backups.
More information about the TAG
mailing list