Backup script failing

Hi,
The backup ~/mailinabox/management/backup.py script started to abort complaining of a missing argument:

~/mailinabox$ sudo management/backup.py
usage: duplicity collection-status [-h] [--archive-dir path] [--azure-blob-tier Hot|Cool|Archive]
                                   [--azure-max-block-size number] [--azure-max-connections number]
                                   [--azure-max-single-put-size number] [--b2-hide-files]
                                   [--backend-retry-delay seconds] [--cf-backend pyrax|cloudfiles] [--compare-data]
                                   [--config-dir path] [--copy-blocksize number] [--copy-links]
                                   [--encrypt-key gpg-key-id] [--encrypt-secret-keyring path] [--file-changed path]
                                   [--file-prefix string] [--file-prefix-archive string] [--file-prefix-manifest string]
                                   [--file-prefix-signature string] [--force] [--ftp-passive] [--ftp-regular]
                                   [--full-if-older-than time] [--gpg-binary path] [--gpg-options options]
                                   [--hidden-encrypt-key gpg-key-id] [--idr-fakeroot path] [--ignore-errors]
                                   [--imap-full-address] [--imap-mailbox imap_mailbox] [--max-blocksize number]
                                   [--metadata-sync-mode {full,partial}] [--mf-purge] [--mp-segment-size number]
                                   [--name backup name] [--no-compression] [--no-encryption] [--no-files-changed]
                                   [--no-print-statistics] [--no-restore-ownership] [--null-separator]
                                   [--num-retries number] [--numeric-owner] [--par2-options options]
                                   [--par2-redundancy number] [--par2-volumes number] [--path-to-restore path]
                                   [--progress] [--progress-rate number] [--rename from to from to]
                                   [--restore-time time] [--rsync-options options] [--s3-endpoint-url s3_endpoint_url]
                                   [--s3-kms-grant s3_kms_grant] [--s3-kms-key-id s3_kms_key_id]
                                   [--s3-multipart-chunk-size number] [--s3-multipart-max-procs number]
                                   [--s3-region-name s3_region_name] [--s3-unencrypted-connection]
                                   [--s3-use-deep-archive] [--s3-use-glacier] [--s3-use-glacier-ir] [--s3-use-ia]
                                   [--s3-use-onezone-ia] [--s3-use-rrs] [--s3-use-server-side-kms-encryption]
                                   [--scp-command command] [--sftp-command command] [--show-changes-in-set number]
                                   [--sign-key gpg-key-id] [--ssh-askpass] [--ssh-options options]
                                   [--ssl-cacert-file file] [--ssl-cacert-path path] [--ssl-no-check-certificate]
                                   [--swift-storage-policy policy] [--tempdir path] [--time-separator char]
                                   [--timeout seconds] [--use-agent] [--verbosity verb] [--webdav-headers string]
                                   target_url
duplicity collection-status: error: argument --gpg-options: expected one argument
Something is wrong with the backup:

I haven’t touched anything but received an email alert of the failure this morning and tried to run manually. Same results as in the email.
Anyone with the same problem?
Thank you

1 Like

Hi, struggling with this also. This thread https://discourse.mailinabox.email/t/something-is-wrong-with-the-backup-error-23/1284/16
I guess your duplicity version has been upgraded and it does not work… in that thread

1 Like

Yes I got the same error this morning. The backup admin UI page also reports an error.

duplicity —version reports 2.0.0. I suspect a recent upgrade has an incompatibility.

1 Like

From the other post downgrading using

sudo apt install duplicity=0.8.21-1build1

Appears to work for me. No errors in the admin UI now.

7 Likes

Thank you @pokeswithastick. You nailed it.
All good now.

1 Like

Thank you @gmills!!
Will refrain from upgrading duplicity until I learn its safe.

Many thanks for sharing this. It got my backups running again

1 Like

To avoid to have ubuntu updating duplicity, until I hear it is safe to do so, I put the package on hold with

sudo apt-mark hold duplicity

and apt-get update will not try to handle duplicity

found it handy

4 Likes

FYI Issue logged in duplicity gitlab on 9 Aug 2023

Duplicity 2.0.0 unable to use --gpg-options

https://gitlab.com/duplicity/duplicity/-/issues/732

FWIW The workaround mentioned in this thread “sudo apt install duplicity=0.8.21-1build1” does not work for me. And I see the previous duplicity version was 1.2.3

Downgrade works for me too, but it doesn’t look like a viable long-term solution

1 Like

Downgrade solved one problem, but created another, with two pages of trace information. I’ll try wiping the existing cache files to see if that works.

The problematic Duplicity 2.0.0 has been pulled, so the hold is no longer needed. Upgrading Duplicity now will install version 1.2.3.

3 Likes
sudo apt install duplicity=1.2.3-ppa202308110119~ubuntu22.04.1

This will downgrade duplicity2.0 back to 1.2.3 if you can’t wait for the repos to update.

2 Likes

@SHAdmin Thanks for the heads up!

Back to 1.2.3 and all is well. Thanks for letting everyone know.

@digititus would you please explain the effects of

sudo apt install duplicity=1.2.3-ppa202308110119~ubuntu22.04.1

What measures should be taken? Do you want to do your own backup beforehand or not?

Should we wait for the updates or when does the bug fix actually come and from whom? Thanx a lot!

This will downgrade Duplicity to the previously working version.

Seems like an upstream issue. They even removed 2.0.0 from their repo for now: Duplicity 2.0.0 unable to use --gpg-options (#732) · Issues · duplicity / duplicity · GitLab

I’d say downgrade to 1.2.3, and wait for the fix which you should receive automatically via apt dist-upgrade as soon as upstream releases it.

If you want to be extra safe you can use sudo apt-mark hold duplicity to prevent it from updating again, and then track the GitLab issue and this GitHub issue, and as soon as the issues are resolved you can upgrade to the fixed version with sudo apt-mark unhold duplicity && sudo apt update && sudo apt dist-upgrade.

Does anybody run into the same problem like me backing up to AWS?

Thx & best regards,

Maurice

I think this is broken again with duplicity 2.1.0

duplicity: error: argument --gpg-options: expected one argument

hum… I checked and the version is indeed back…
I don’t know if it got updated after today’s back up… lets see if it is broken tomorrow
Hope not