canonical / charm-duplicity

A charm that provides functionality for both manual and automatic backups for a deployed application
0 stars 3 forks source link

GPG encryption fails due to invalid flag #2

Closed jneo8 closed 11 months ago

jneo8 commented 11 months ago

Running the do-backup action when configuring "gpg_public_key" to enable asymmetrical GPG encryption leads to a failure due to using the wrong flag.

The charm is using "--gpg-key" to enable gpg encryption [1], but the actual flag to do this in duplicity is "--encrypt-key" [2]

Full output of the action below, note the error: "no such option: --gpg-key"

message: "Command \"['duplicity', '--rsync-options=-e \"ssh -i /root/.ssh/duplicity_id_rsa\"', 'full', '/home/ubuntu/important', 'rsync://USER>@<HOST:22/mybackups/duplicity-1', '--gpg-key=']\" failed with return code
\"2\" and error output:\nUsage: \n duplicity [full|incremental] [options] source_dir
target_url\n duplicity [restore] [options] source_url target_dir\n duplicity
verify [options] source_url target_dir\n duplicity collection-status [options] target_url\n duplicity list-current-files [options] target_url\n duplicity cleanup [options] target_url\n duplicity remove-older-than time [options] target_url\n \ duplicity remove-all-but-n-full count [options] target_url\n duplicity remove-all-inc-of-but-n-full count [options] target_url\n\nBackends and their URL formats:\n cf+http://container_name\n \ file:///some_dir\n ftp://user[:password]@other.host[:port]/some_dir\n ftps://user[:password]@other.host[:port]/some_dir\n \ hsi://user[:password]@other.host[:port]/some_dir\n imap://user[:password]@other.host[:port]/some_dir\n \ rsync://user[:password]@other.host[:port]::/module/some_dir\n rsync://user[:password]@other.host[:port]/relative_path\n \ rsync://user[:password]@other.host[:port]//absolute_path\n s3://other.host[:port]/bucket_name[/prefix]\n \ s3+http://bucket_name[/prefix]\n scp://user[:password]@other.host[:port]/some_dir\n \ ssh://user[:password]@other.host[:port]/some_dir\n swift://container_name\n \ tahoe://alias/directory\n webdav://user[:password]@other.host/some_dir\n webdavs://user[:password]@other.host/some_dir\n \ gdocs://user[:password]@other.host/some_dir\n pydrive://

\n list-current-files \n restore \n \ remove-older-than