rdiff-backup's new interface

My favourite incremental backup tool is rdiff-backup, mostly because it’s so conceptually simple. When you back up a source directory to a destination, the destination directory becomes an exact replica. The only difference is it contains an additional subdirectory rdiff-backup-data, inside which it stashes all the metadata plus data pertaining to earlier increments in case you wanted to restore something earlier than the latest snapshot.

I find it profoundly reassuring to be able to see and interact with the backup copy of the files. If I need to restore from the latest backup I don’t need any special software—it’s just copying files. It’s old, stable, and packaged everywhere. A+.

I feed it my entire homedir, which means there are often 10s to 100s of thousands of files changed in each increment, mostly inconsequential. rdiff-backup churns through them all in short order so I don’t waste any time worrying about it.

Perhaps its weakest point has been the convoluted CLI syntax with lots of long-format options that weren’t so easy to work out. Happily it has recently had a revamp and the CLI started warning me that I should switch to using the new syntax.

My backup script is quite simple and I only needed to make a handful of changes. Much tidier!

# Back up directory - old vs new
$ rdiff-backup --print-statistics $srcdir $destdir
$ rdiff-backup backup --print-statistics $srcdir $destdir

# Remove old increments, allowing deleting more than one at once - old vs new
$ rdiff-backup --remove-older-than 52W --force $destdir
$ rdiff-backup --force remove increments --older-than 52W $destdir

# List all increments including cumulative size to keep them - old vs new
$ rdiff-backup --list-increment-sizes $destdir
$ rdiff-backup list increments --size $destdir