I ported the python2 version of rdiff-backup to my 20.04 system and installed it there. My backup server runs 18.04 too.
Code:
$ rdiff-backup --version
rdiff-backup 1.2.8
$ file /usr/local/bin/rdiff
/usr/local/bin/rdiff: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=37a8ca37e600fd98526c93bad8e5657e10106822, for GNU/Linux 3.2.0, with debug_info, not stripped
$ rdiff --version
rdiff (librsync 0.9.7) [x86_64-unknown-linux-gnu]
Copyright (C) 1997-2001 by Martin Pool, Andrew Tridgell and others.
http://rproxy.samba.org/
Capabilities: 64 bit files
$ locate librsync
/usr/local/include/librsync-config.h
/usr/local/include/librsync.h
/usr/local/lib/librsync.a
/usr/local/lib/librsync.la
/usr/local/lib/python2.7/dist-packages/rdiff_backup/_librsync.so
/usr/local/lib/python2.7/dist-packages/rdiff_backup/librsync.py
/usr/local/lib/python2.7/dist-packages/rdiff_backup/librsync.pyc
/usr/local/share/man/man3/librsync.3
rdiff-backup is python2, so there's no way around installing that dependency.
Think I had to recompile librsync and rdiff (not rdiff-backup) too, but I don't recall. Sorry.
BTW, the file format on disk hasn't changed, the problem is that rdiff-backup is dependent on the python serialization of data between the client and the server. Python3 changed it from python2. They are incompatible.
Good news. I took some notes in vimwiki for copying my port to other systems:
== 20.04 rdiff-backup Install ==
Code:
sudo apt install python2
# Install rdiff scripts - running in root account
cd /usr/local/bin/
scp thefu@regulus:/usr/local/bin/rdiff* .
# Get librsync stuff - running in root account
cd /usr/local/lib
scp thefu@regulus:/usr/local/lib/librsync.* .
# Get librsync stuff - python2 modules - running in root account
cd python2.7/dist-packages/
rsync -avz regulus:/usr/local/lib/python2.7/dist-packages/rdiff_backup .
I'm positive these steps work to copy the stuff to other systems, since I moved my email gateway over to 20.04 last month and setup "pull" backups for it from an 18.04 server. I didn't re-port librsync or rdiff, so those steps aren't available. I don't recall them being too hard. regulus is the 20.04 client system where I did the original porting.
20.04 and later OSes are python3. There are a number of workarounds besides porting. You could setup a 20.04 lxd container with access to the backup storage on your backup server, then using that to service all 20.04 client machines and use the current 18.04 server for earlier clients. I've considered this myself. Or work out a plan to migrate to a new 20.04 backup server (perhaps with a different, newer, HDD). Setup and use of LXD is crazy fast. The minimal OS is under 2G, just hook up some storage. Of course, lxd is provided only as a snap package, which breaks on most of my systems due to my use of NFS for HOME directories. For a 20.04 backup server, I wouldn't need that.
You know. Think I'll setup that 20.04 lxd server now on the 18.04 backup server. I'll take some notes.
Code:
$ sudo snap install lxd
$ lxd init <--- the questions here are a little funky. It never asked me about storage, which is scary. I did have to setup a local userid, no NFS home. Hooked up the network bridge to an existing bridge on the system, so it will have an IP on that same subnet.
$ lxc list <--- shows nothing.
$ lxc launch ubuntu:20.04 back-2004 <--- that downloads and creates the 20.04 system.
$ lxc list
+-----------+---------+----------------------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+----------------------+------+-----------+-----------+
| back-2004 | RUNNING | 172.22.22.231 (eth0) | | CONTAINER | 0 |
+-----------+---------+----------------------+------+-----------+-----------+
$ lxc exec back-2004 -- sudo --login --user ubuntu
# Now on the new LXD system:
$ df -Th -x tmpfs
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdc1 ext4 20G 12G 6.7G 64% /
Looks good, but I don't like the default storage under /var/lxd/ . Really want to put that on some RAID1 storage this machine has. Need to move the networking over to a static IP, update DNS, setup ssh-server, rdiff-backup, .... hook up some nfs storage to the main backup server storage locations. It is a hack for now.
Not bad for 10 minutes.
Bookmarks