Also, I was able to confirm that backup.py directly references /usr/bin/duplicity so that symlink is a needed step. I’ve updated the solution edited into the top post. Thanks again!
Edit 01 Feb 2024: I realized that an update of MiaB would probably reinstall duplicity on top of our snap symlink. So you’ll also want to block duplicity from being installed via apt. We do this by creating an apt preference file:
$ sudo echo -e "# Duplicity is installed via snap\nPackage: duplicity\nPin: release *\nPin-Priority: -1" > /etc/apt/preferences.d/duplicity
The Duplicity release notes at Releases · duplicity / duplicity · GitLab now state: “This is the 2.2.1 release of duplicity. It fixes the packaging problems in 2.2.0.” Updating our MiaB server reported: “Setting up duplicity (2.2.1-ppa202401301651~ubuntu22.04.1) …” Nevertheless, after restarting the server, the Backup Status page still reports: “[Errno 2] No such file or directory: ‘/usr/bin/duplicity’”
I realized that an update of MiaB would probably reinstall duplicity on top of our snap symlink. So you’ll also want to block duplicity from being installed via apt. We do this by creating an apt preference file:
$ sudo echo -e "# Duplicity is installed via snap\nPackage: duplicity\nPin: release *\nPin-Priority: -1" > /etc/apt/preferences.d/duplicity
Now if you try to install duplicity it can’t:
user@mailbox:~$ sudo apt install duplicity
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package duplicity is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'duplicity' has no installation candidate
MiaB may want to change the preferred deployment of duplicity, however. The jammy repos only provide duplicity 0.8.21, and at this point most folks require 2.x. Switching to a deployment of the stable snap release seems like a much more straightforward way to manage it than the git PPA.
If, by manually, you mean did I run “apt” by hand, then yes. As soon as I saw the duplicity project had a new release to fix this issue, I ran update, which showed a new package was available, followed by upgrade. As follows:
sudo apt update
sudo apt upgrade
As I was writing this, I just logged onto my server and ran those again, and see that there was yet another new update available:
As I understand it, the 2.2.0 version is the one with the packaging problem (which resulted in a missing /usr/bin/duplicity). On my system the 2.2.1 versions are not missing this file, and nightly backups are running without issue.
I’ll add one final note that might help some of you, I did not attempt to apply any of the workarounds to the broken 2.2.0 that have been discussed on these forums. So, if you’re still having problems with the newest 2.2.1 package, you may want to look at whether you made any manual changes to your system that are affecting the installation of the new version.
That said, I encourage anyone reading this to avoid using a nightly PPA for their software unless they’re prepared to deal with issues that crop up due to it. Installing via snap is easy, straightforward, and will put you on a stable release channel that self-updates as needed.
Thanks for detailed explanation, thats exactly I wanted to understand, anything other than apt command I assume manual, I verified the latest update and its working again, thanks again!
Thank you for all the hard work you’ve put in on this problem, but can I respectfully suggest you stop pushing the “snap” option as not everybody wants to go down that route.
As a workaround for possible future events like this, I’ve set duplicity package on hold. My plan is to keep duplicity on hold. When duplicity PPA gets updated, I should get notified by “Status Checks Change Notice” email.
After that I’ll wait for some time and see if there have been any issues reported regarding duplicity in MIAB forums.
sudo apt-mark hold duplicity
After I’m reasonably sure that new duplicity isn’t broken, then I’ll update it in the following manner.