Backupninja from Debian to Ubuntu

Some hints about using Backupninja to backup Debian servers to an Ubuntu box

Andrew and I currently use Backupninja for backing up our servers and laptops to our Ubuntu PVR, because this is the only machine at home thats guaranteed to be on 24-7. Backupninja was recommended to us by Michael and David. It runs on the servers that you want to back up, and uses a conf.d directory to store tasks, such including pgsql dumps which save to /var/backups, and then there is a final task which executes rdiff-backup to push over the files.

As far as I can tell, rdiff-backup uses a combination of diffs, symlinks and rsync to have a snapshot history yet only use the bandwidth and disk space that a normal rsync would use.

Backupninja insists that the version of rdiff-backup is the same at both ends, and although you can override it with the ignore-version conf file entry, I'd rather not as chaos and unrecoverable backups would probably follow.

Since we had multiple Debian servers to be backed up, and only one one Ubuntu recipient, we chose to leave the Ubuntu boxes with the stock lenny version of rdiff-backup and change the Ubuntu version to match. (Also, rdiff-backup is not in lenny-backports) At the time of writing, Debian Lenny had v1.2.5 and Ubuntu Jaunty v1.2.7.

We installed rdiff-backup_1.2.5-1build1_i386.deb on the Jaunty box but when the cron ran, got this lovely error:

Fatal: rdiff-backup does not have the same version at the source and at the destination.

After was not actually caused by the rdiff-backups having different versions, but by Ubuntu Bug 345086. Until v1.2.7, Ubuntu packaged rdiff-backup wrong. It installs to /usr/local/bin, not to /usr/bin as on Debian. As a result the Debian servers couldn't find the binary when connecting over ssh.

I could have rebuilt the v1.2.5 deb from source so that it installs to /usr/bin, but in the end I settled on
ln -s /usr/local/bin/rdiff-backup /usr/bin/rdiff-backup

I've also filed a bug against Backupninja, with a patch so that it checks ssh's exit value and gives a more appropriate error if it can't find rdiff-backup in the right place on the remote server.

Posted 19th August 2009 in Computer, with 0 comments

Digg!

comments


  1. (optional)