Duplicity Update Broke Backups

A recent Duplicity backup, not unexpectedly broke backups. I waited for another Duplicity upddate and now have 3.2.0.1 installed. Ran sudo Mailinabox and sudo reboot. Logged into box successfully however “System Status Checks” and “backup status” both returns message “something went wrong”. Received overnight email from box stating the following: DEBUG: sys.path=[‘/usr/bin’, ‘/usr/lib/python310.zip’, ‘/usr/lib/python3.10’, ‘/usr/lib/python3.10/lib-dynload’, ‘/usr/local/lib/python3.10/dist-packages’, ‘/usr/lib/python3/dist-packages’]
DEBUG: sys.executable=/usr/bin/python3
DEBUG: os.environ[‘PYTHONPATH’]=None
Traceback (most recent call last):
File “/usr/bin/duplicity”, line 5, in
from duplicity.main import dup_run
File “/usr/lib/python3/dist-packages/duplicity/main.py”, line 39, in
from duplicity import tempdir
File “/usr/lib/python3/dist-packages/duplicity/tempdir.py”, line 35, in
from duplicity import config
File “/usr/lib/python3/dist-packages/duplicity/config.py”, line 32, in
from duplicity import gpg
File “/usr/lib/python3/dist-packages/duplicity/gpg.py”, line 35, in
import gnupg
ModuleNotFoundError: No module named ‘gnupg’
Traceback (most recent call last):
File “/root/mailinabox/management/status_checks.py”, line 1179, in
run_and_output_changes(env, pool)
File “/root/mailinabox/management/status_checks.py”, line 1020, in run_and_output_changes
run_checks(True, env, cur, pool)
File “/root/mailinabox/management/status_checks.py”, line 63, in run_checks
run_system_checks(rounded_values, env, output)
File “/root/mailinabox/management/status_checks.py”, line 160, in run_system_checks
check_backup(rounded_values, env, output)
File “/root/mailinabox/management/status_checks.py”, line 278, in check_backup
backup_stat = backup_status(env)
File “/root/mailinabox/management/backup.py”, line 72, in backup_status
raise Exception("Something is wrong with the backup: " + collection_status)
Exception: Something is wrong with the backup:
Any suggestion how to fix this

This is a different issue than the earlier one (with 3.2.0). I resolved it by “apt-get install python3-gnupg” to install the missing module. Unsure whether this is a new (and intended) dependency with Duplicity, and I don’t know whether the MiaB installer is the place to resolve it, but adding it seemed harmless.

3 Likes

Thank you for your input. I installed as you suggested python3-gnupg and at least got access to “System Status Checks” and “backup status. Tonight’s status report will hopefully confirm all is well. Thanks again

1 Like

Thanks! I had the same problem after updating, installing python3-gnupg fixed it for me as well.

The Duplicity requirements.txt file now lists python-gnupg as a basic requirement. The change is documented here: fix:usr: Use ‘python-gnupg’ instead of our ‘gpginterface.py’. It seems that this dependency should be updated automatically when the Duplicity package is updated.

2 Likes

So is the recommendation to apt-get install python3-gnupg and then to allow the duplicity updates to occur 3.2.1? I put a hold on the updates to duplicity when I saw this and am currently holding on 3.1.0.

thanks!

The packaged version of Duplicity is now 3.2.0.2, which includes a fix of this problem. Running
sudo apt-get update && sudo apt-get dist-upgrade
then running
sudo apt-get autoremove && sudo apt-get autoclean --yes && sudo apt-get check
will correctly upgrade the software packages used by MiaB including Duplicity.