Score:1

Running rdiff-backup version 1 (say 1.2.8) on Ubuntu 20.04

nz flag

I need to run rdiff-backup version 1 (say 1.2.8) on Ubuntu 20.04 to allow the Ubuntu 20.04 box to be backed up by a legacy backup server.

I tried to follow the post here: https://askubuntu.com/a/1280195/1564231, but this gave me the error:

# apt install -y librsync1=0.9.7-10build1 rdiff-backup=1.2.8-7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '0.9.7-10build1' for 'librsync1' was not found

(and I don't have the reputation to comment on that answer)

So I tried to find and download the specific packages needed, which I did:

# wget http://cz.archive.ubuntu.com/ubuntu/pool/main/libr/librsync/librsync1_0.9.7-10build1_amd64.deb
# dpkg -i librsync1_0.9.7-10build1_amd64.deb
Selecting previously unselected package librsync1:amd64.
(Reading database ... 135179 files and directories currently installed.)
Preparing to unpack librsync1_0.9.7-10build1_amd64.deb ...
Unpacking librsync1:amd64 (0.9.7-10build1) ...
Setting up librsync1:amd64 (0.9.7-10build1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
# dpkg -i rdiff_0.9.7-10build1_amd64.deb
(Reading database ... 135189 files and directories currently installed.)
Preparing to unpack rdiff_0.9.7-10build1_amd64.deb ...
Unpacking rdiff (0.9.7-10build1) over (0.9.7-10build1) ...
Setting up rdiff (0.9.7-10build1) ...
Processing triggers for man-db (2.9.1-1) ...

and that seemed to work ok. So I then did the same with rdiff-backup

# dpkg -i rdiff-backup_1.2.8-7_amd64.deb
Selecting previously unselected package rdiff-backup.
(Reading database ... 135189 files and directories currently installed.)
Preparing to unpack rdiff-backup_1.2.8-7_amd64.deb ...
Unpacking rdiff-backup (1.2.8-7) ...
dpkg: dependency problems prevent configuration of rdiff-backup:
 rdiff-backup depends on python (>= 2.7.1-0ubuntu2); however:
  Package python is not installed.
 rdiff-backup depends on python (<< 2.8); however:
  Package python is not installed.

dpkg: error processing package rdiff-backup (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 rdiff-backup

Which didn't go so well, but it is now installed:

# rdiff-backup
bash: /usr/bin/rdiff-backup: /usr/bin/python: bad interpreter: No such file or directory

So setting up alternatives:

# update-alternatives --install /usr/bin/python python /usr/bin/python2 1
update-alternatives: using /usr/bin/python2 to provide /usr/bin/python (python) in auto mode
# update-alternatives --install /usr/bin/python python /usr/bin/python3 2
update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in auto mode
# update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path              Priority   Status
---------------------------------------------
* 0            /usr/bin/python3   2         auto mode
  1            /usr/bin/python2   1         manual mode
  2            /usr/bin/python3   2         manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/python2 to provide /usr/bin/python (python) in manual mode

and:

# rdiff-backup --version
rdiff-backup 1.2.8

but, it leaves me with a problem of apt complaining whenever I try to do other things:

root@tek:/usr/local/src/rdiff-backup# apt upgrade wget
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 rdiff-backup : Depends: python (>= 2.7.1-0ubuntu2)
                Depends: python (< 2.8)
                Recommends: python-pylibacl but it is not installed
                Recommends: python-pyxattr
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Should I have done things differently earlier? Can I fix the apt problem?

I have done a

# apt-mark hold rdiff-backup

to stop apt upgrading rdiff to version 2.

Thanks very much Kevin

Score:0
zw flag

You have to get Ubuntu 20.04 LTS fully upgraded and sane first by

sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade

then download rdiff-backup and librsync1 packages from 18.04 LTS repository, install them by

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/r/rdiff-backup/rdiff-backup_1.2.8-7_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/libr/librsync/librsync1_0.9.7-10build1_amd64.deb

sudo apt-get install ./rdiff-backup_1.2.8-7_amd64.deb ./librsync1_0.9.7-10build1_amd64.deb

and finally pin their versions by single below command

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-rdiff-rsync
Package: rdiff-backup
Pin: version 1.2.8-7
Pin-Priority: 1337

Package: librsync1
Pin: version 0.9.7-10build1
Pin-Priority: 1337
EOF
Kevin W avatar
nz flag
Fantasic, Thank you! So I have undone my attempts with apt remove rdiff-backup librsync1 rdiff librsync2 python3-pylibacl python3-pyxattr; apt-mark unhold rdiff-backup; update-alternatives --remove-all python. Then I followed your instructions and also downloaded http://archive.ubuntu.com/ubuntu/pool/main/p/python-pylibacl/python-pylibacl_0.5.3-1build2_amd64.deb and http://archive.ubuntu.com/ubuntu/pool/main/p/python-pyxattr/python-pyxattr_0.6.0-2build2_amd64.deb and I also pinned pyxattr and pylibacl too. All seems to be working so far....
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.