rsnapshot
rsnapshot, the remote filesystem snapshot utility, is a nice little tool. It uses rsync to copy a filesystem from one point to another, using a diff-based system to keep multiple snapshots and only copy/download the changed files into the new snapshot, leaving past versions of the backup(s) hanging around for as long as you want.
For example, you could have a set of backups made every four hours, another every day, another every week, and so on, for as long as you want to retain past filesystem states. And if a file never changed, there is only one file in the backup for all of the times it appears in your snapshots. Pretty slick.
My project today was installing it on leto, the NAS box here at home. It has over 2 terabytes of disk space, so it’s a perfect candidate for keeping all sorts of backups. Here’s a small little config, which copies what I think are going to be all of the important parts of Empty Matter:
/etc/rsnapshot.conf
snapshot_root /share/snapshots/ # ... interval hourly 12 interval daily 14 interval weekly 8 interval monthly 24 # ... backup root@emptymatter.org:/etc/ emptymatter/ backup root@emptymatter.org:/home/ emptymatter/ backup root@emptymatter.org:/root/ emptymatter/ backup root@emptymatter.org:/var/www/ emptymatter/ backup root@emptymatter.org:/var/log/ emptymatter/
That keeps an large (perhaps even excessive) number of backups in /share/snapshots/ (owned and only readable by root). We’ll see if it’s overkill or not, but I’m expecting a lot of my big files to not change, and thus be hard-linked multiple times without re-copying the files. But I’m always wishing I could go back to old config files, so this is an attempt to thwart future regret with that problem.
Other hosts will be added soon. Finally, I have a use for that NAS. :)
Edit: another useful link: Using Rsnapshot and SSH.

