Backup again

Here at home, I'm extremely happy with rsnapshot as a backup solution. It's exactly what I need: easy to configure (with just a few pitfalls), totally transparent, and very reliable. Too bad I can't use it at work: the incremental backups of rsnapshot rely on hard links, which are supported neither by cifs nor by sshfs. And no, I do not want a server-based (pull) backup. I want to push my data!

We briefly thought about setting up nfs, but that requires kerberos for secure authentication ... oh well, that's really too much hassle for a lonely snake. I instead decided to search an easy-to-use backup program which does not require hard links. Easy to use, mind you: enterprise-class solutions of the like as bacula or amanda are explicitely ruled out.

And I think I found one: rdiff-backup, which realizes incremental backups via rdiff.

The configuration is simple:

# Be nice to the hard disk
ionice -c3 -p$$
# Some variables
source="/home/cobra" # directory being backed up
destination="/mnt/home/rdiff" # directory backing up to
# Mount home (check your local uid and gid with id)
sshfs username@server:/home/users/username /mnt/home \
-o workaround=rename,uid=local_uid,gid=local_gid
# Checking for old backups that need to be removed
echo "Removing backups older than one month"
rdiff-backup --remove-older-than 30D --no-hard-links --force $rdestination
# For a list of the number and date of incremental backups, use:
# rdiff-backup -l $destination
# Start the backup
echo "Starting backup"
nice -n +15 rdiff-backup --print-statistics --no-hard-links --exclude-sockets \
--exclude-filelist $excludelist $source $destination
echo "Backup complete"
# Unmount home
fusermount -u /mnt/home

The exclude list might look like that:


I've just started to use it, but so far it looks very promising. Ask me again in 30 days. 😊

What I will detail very soon in a forthcoming blog entry: how to automate this backup in the most convenient way.