Question: Making efficient backups on Debian?

Posted by Serge on Fri 10 Dec 2004 at 10:05

I was wondering what needs to be backed-up on a Debian system, without backing up too much, considering packages can be re-downloaded. Until now, I've been using this various pieces (amongst others) in my backup script, on a server that performs typical LAMP, DNS en email services.
dpkg --get-selections > /var/backups/apt-backup-selections
mysqldump -u root --password=$MYSQLROOTPW --all-databases --opt > "/var/backups/mysql-$DATE.sql"
tar --absolute-names --create -j --file $MOUNTDIR/$BACKUPDIR/backup-$DATE.tbz --exclude-from=$EXCLUDE $INCLUDE
After this I make remote stored backups of
/etc 
/root 
/var/cache/bind 
/var/lib/dpkg 
/var/backups 
/var/www 
/usr/local

I somehow am in doubt whether this is enough, at least to the extent of the base system and the configurations. More specially, a good backup of the apt system seems important to be able to easily recover the host.
I should actually take the time to test a disaster recovery with this setup, but as I don't have a second Bytemark host handy, I'm keeping using this as a (bad) excuse :)

So what are other people here doing about their Debian host backups?


Serge

This article can be found online at the Debian Administration website at the following bookmarkable URL (along with associated comments):

This article is copyright 2004 Serge - please ask for permission to republish or translate.