A long time ago when I started wanting good incremental backups for my data, I looked around the net and found many good tools, but none that did exactly what I wanted. Either the process to restore from the backup was slow, or they didn’t support SSH, or any number of other small annoyances.

So I wrote my own wrapper around rsync to do what I wanted: incremental.sh. And now I’m releasing that for anyone else to use. Pretty much as long as the source and target machine can run rsync, they can use the wrapper. Instructions are in the script itself.

It makes use of rsync’s –link-dest option to minimize space usage for increments by hard linking unchanged files to the previous increment’s version. I run it nightly, and have between 100x to 1000x speed improvements over doing a full backup, plus even though I keep several days’ worth of changes, the used space overhead is limited to only what has changed between current and oldest version.

Another plus is how restoring from any of the increments is as easy as copying the file out of that folder. And a full restore from that point in time is an rsync away. I have done several full restores from backups made with this script, and I so far haven’t found a better format for backups.

One minus is that currently this is only a pull script. I have no push version, nor need of one, as I prefer running a read-only rsync daemon firewalled down to only the IPs that will be pulling data from it.

URLs