Unless you're really set on rsync, you might look into using tar to make compressed archives of your base system. If you do this as root everything is pretty easy to restore. Using the guide below (its based on Ubuntu but works fine for either it or debian--or probably a host of other distros) I've been taking weekly backup snapshots (automated with cron) of my servers system (everything except the movies / music / documents.) Twice now when I've screwed up something really bad all I've had to do is run a single command (as root) and while still booted into the messed up system (or from a live system like #!), reboot, and my everything was back in place like the day the snapshot was made.
The downside of this is you'll probably have to clean out old snapshots as they grow stale and you don't have any need for them. The other option is to simply copy over your previous backup each time you make a new tar archive. (So instead of have lots of dated backups around, you just have one.) I do the later on the laptop i carry around so that I always have a backup handy without sacrificing too much disk space.
The amount of disk space this will require depends on what you exclude. Personally I include /home simply because none of my major media is stored there--but configs and virtual machines I want in a backup are. As such my tar backups can be up to 6 or 7 gigs.
The guide I used as a base is at: http://ubuntuforums.org/showthread.php?t=35087
The script I use to make dated backups on my server looks like:
#!/bin/bash
DATE="`date +%F`"
mount /media/redundant
cd /media/redundant/server
tar cvpzf backup_$DATE.tgz --exclude=/proc --exclude=/lost+found --exclude=/media --exclude=/mnt --exclude=/sys --exclude=/mnt /
umount /media/redundant
Line by line this does:
1)Set variable for todays date
2)Mount media where I"m going to store the backup
3)Change directory to where the backup will be made
4)Creating the backup archive with the name backup_$DATE (so it puts the current date in the name.) The rest of the command is a lot of excluded directories, and the final command "/" indicates I want to backup up everything on the drive.
5)Unmount media now that I'm done using it.
The cron setup for a once-weekly backup:
0 1 * * 7 /root/bin/serverbackup.sh
.
Personally I've found tar preferable to rsync for system backups, and rsync preferable to tar for media (music,movies,documents) backups.
Hope this helps.
IRC: PizzaAndWine Script bits:
Incremental Backup |
Sleep Timer