Introduction
Upgrading from Debian 11 to Debian means upgrading from rdiff-backup 2.0.5 to rdiff-backup 2.2.2. On a network with one backup server any many backup clients this means that for some time the following four combinations of versions will need to function:
situation | server version | client version | notes |
---|---|---|---|
#1 | 2.0.5 | 2.0.5 | situation at start of network-wide upgrade |
#2 | 2.0.5 | 2.2.2 | |
#3 | 2.2.2 | 2.0.5 | |
#4 | 2.2.2 | 2.2.2 | situation at end of network-wide upgrade |
The first situation is the starting point and requires no further explanation.
The second situation requires some workarounds because different rdiff-backup versions typically won’t talk to each other.
The same applies to the the third situation.
The fourth situation looks like the first but a few small fixes are required in order to be able to reuse this procedure when Debian 13 comes out.
It is possible to avoid one of the second and third situations by either upgrading the backup server before all clients or the other way round. But this strategy risks being able to perform all backups one day and none the next!
The rest of this procedure describes how to cope with each situation. It is heavily based on the official rdiff-backup migration documentation.
Procedure
All commands are to be run as root on the backup server unless noted.
- Run:
apt -y install python3-dev libacl1-dev virtualenv \ build-essential curl openssh-client wget wget https://svn.pasta.freemyip.com/main/smalltools/trunk/bin/rdiff-backup-wrapper chmod 755 rdiff-backup-wrapper
- If the script needs to be called rdiff-backup in order to be correctly called by your own backup scripts then rename it. But note that rdiff-backup-wrapper attempts to call /usr/bin/rdiff-backup if RDIFFBACKUP_VERSION is not set, so you probably don’t want to replace /usr/bin/rdiff-backup, but just put the wrapper script in earlier in $PATH.
- Ensure that your own backup scripts call rdiff-backup-wrapper with RDIFFBACKUP_VERSION set to the same version as the client it is to back up. For my own benefit, this is what I had to change:
- Get rdiff-backup-wrapper by running:
mkdir -p ~/opt svn co https://svn.pasta.freemyip.com/main/smalltools/trunk ~/opt/smalltools
- Create ‘rdiff-backup’ and ‘rdiff-backup-one-fs’ backup methods in /etc/rdw2 to override the ones provided by the package by running:
mkdir -p /etc/rdw2/methods/Linux/Linux/backups ln -s ~alexis/dev/def/rdw2/doc/examples/etc/rdw2/methods/Linux/Linux/backups/rdiff-backup* .
- Although nobody else is using rdw2 for backups, /etc/…/rdiff-backup might be of interest to other people. You can find it here.
- Get rdiff-backup-wrapper by running:
- As each backup client is upgraded from Debian 11 to Debian 12, so /etc/…/rdiff-backup needs to be modified to tell the server to change the version of the rdiff-backup protocol that it speaks to the client.
- Once the entire network is upgraded then there is some cleaning up to do:
- I’m not at this point yet!