I know that ARM is officially unsupported (I see the warning on every update) but I nonetheless use it, mostly because I have a free t4g.small instance from AWS and host my MIAB on there.
I have been receiving backup errors for some time now and have ignored them.
`GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: Note: ‘–force-mdc’ is not considered an option
gpg: Note: ‘–symmetric’ is not considered an option
gpg: WARNING: no command supplied. Trying to guess what you mean …
usage: gpg [options] [filename]
===== End GnuPG log =====
Traceback (most recent call last):
File “/home/ubuntu/mailinabox/management/backup.py”, line 647, in
perform_backup(full_backup)
File “/home/ubuntu/mailinabox/management/backup.py”, line 318, in perform_backup
shell(‘check_call’, [
File “/home/ubuntu/mailinabox/management/utils.py”, line 126, in shell
ret = getattr(subprocess, method)(cmd_args, **kwargs)
File “/usr/lib/python3.10/subprocess.py”, line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/bin/duplicity’, ‘full’, ‘–verbosity’, ‘warning’, ‘–no-print-statistics’, ‘–archive-dir’, ‘/home/user-data/backup/cache’, ‘–exclude’, ‘/home/user-data/backup’, ‘–volsize’, ‘250’, ‘–gpg-options’, “‘–cipher-algo=AES256’”, ‘–allow-source-mismatch’, ‘/home/user-data’, ‘file:///home/user-data/backup/encrypted’]’ returned non-zero exit status 31.`
I decided to dive into the issue.
It seems that Duplicity for ARM is only available through version 0.8.21 (duplicity : arm64 : Jammy (22.04) : Ubuntu) which had a bug in it and was causing my GPG errors. (Backup script failing
Snap, however, has newer versions of duplicity that work on ARM.
I removed tha apt version of duplicity and installed the snap version.
However when installing via snap the MIAB scripts did not find duplicity because it was installed in /snap/bin
instead of /usr/bin
To fix this I created symlink sudo ln -s /snap/bin/duplicity /bin/duplicity
which then allowed the snap version of duplicity to be called by the MIAB scripts which reference /usr/bin/
Let me know if this is unclear or if you have any follow up questions.
Thanks to @dms and @KiekerJan for helping me work through this