[K12OSN] Backing up a server...best methods

Frederik Dannemare frederik at dannemare.net
Thu Nov 18 13:36:57 UTC 2004


On Wednesday 17 November 2004 15:52, David Trask wrote:
> I know this subject has been out there before, but now it's my turn. 
> I had my Samba/LDAP server go down (not totally, but I couldn't get
> myself out of the mess...so....)  I thought I had made good backups
> with Mondo, but when I went to use it....it wouldn't work.  So....I'm
> wondering about some easy ways to do an entire bare metal backup of
> my server.  I have plenty of space on an NFS share with a full
> gigabit link between both servers.  My Samba/LDAP server does have 4
> drives that are RAID'ed in various manners....(ie: RAID 0 for
> Swap....RAID 1 for /home....etc)  How can I back this up?  I'm open
> to anything from simple "tar" and "dd" to using another program...to
> somehow using Mondo correctly.....  In Mondo I created ISO's and put
> them on the NFS share....I burned disc one and loaded it in the
> server, but no go.....it told me my CD was "eccentric" and to use the
> floppies....and the floppies were'nt recognized....(the device not
> recognized...but it works fine)....?????  At this point I'm
> rebuilding and then I'll put the home dirs back, but planning for
> "next time"

I'd probably go with rdiff-backup in combination with ssh to do 
automated and secure backups over the network (using ssh keys).

Having installed rdiff-backup on the backup server and on the machines 
to be backed up ('backup clients'), something like this (command 
executed on the backup server) should do the trick in order to get a 
complete backup:
rdiff-backup \
        --exclude /mnt \
        --exclude /media \
        --exclude /cdrom \
        --exclude /floppy \
        --exclude /proc \
        --exclude /sys \
        --exclude /tmp \
        <backup_client>::/ /usr/local/backup/<backup_client>

Run it as a script via cron every night and you will automatically have 
daily incremental backups that are easy to restore. E.g. to restore a 
user's kde config as it was two days ago, simply do:
rdiff-backup --force --restore-as-of 2D \
        /usr/local/backup/homer/home/frederik/.kde/share/config \
        <backup_client>::/home/frederik/.kde/share/config

Another tool, I enjoy using, is Partimage.
-- 
Frederik Dannemare | mailto:frederik at dannemare.net
http://qa.debian.org/developer.php?login=Frederik+Dannemare
http://frederik.dannemare.net | http://www.linuxworlddomination.dk




More information about the K12OSN mailing list