Saturday, 19 December 2009

Backing up with rdiff-backup remotely

For some time I wanted to make a decent setting to create daily backups of my different computers, but somehow kept delaying it... Not any more...

In the end, it is actually pretty easy to set up (though I still need to verify that doing it automatically instead of manually does not give me any trouble).

I basically mount a remote directory in my local tree with sshfs

sshfs remote_machine:/net/angelv/BACKUPS /BACKUPS/NAS/ -o workaround=rename

The -o workaround=rename is important, as previously I was having trouble doing this sort of backup through sshfs (see this).

Once this is in place, having daily incremental backups is as easy as putting in my cron:

0 2 * * * rdiff-backup /home/angelv /BACKUPS/NAS/VASO.HOME.BACKUP
0 3 * * * rdiff-backup --remove-older-than 4W /BACKUPS/NAS/VASO.HOME.BACKUP

See more examples.

No comments: