holland-backup / holland

Holland Backup Manager
http://hollandbackup.org
Other
152 stars 49 forks source link

Unable to provide multiple GPG recipients #335

Closed l3rady closed 3 years ago

l3rady commented 3 years ago

Could we make the recipients of the GPG compression setting configurable?

At the moment the setup doesn't pass any -r param to GPG so the default recipient set in gpg.conf is used. This does not allow for multiple recipients to be set. Could we please have a configurable option that allows us to set a comma-separated list of recipients GPG will encrypt for?

soulen3 commented 3 years ago

Thanks for reporting this issue. I believe you should be able to use the options configuration option under compression.

https://docs.hollandbackup.org/docs/provider_configs/mysqldump-lvm.html#compression

[compression]
method = gpg
options = "-r user"

Can you please try this and let me know if it doesn't work as expected?

l3rady commented 3 years ago

@soulen3 ah yes good idea! I will give it a go and get back to you. I did just update holland today and now using python3 but now getting the following error: MySQL Error 'bytes' object has no attribute 'encode' when performing a backup. Need to get to the bottom of this first.

soulen3 commented 3 years ago

I'll be tagging a new release for that today. See #331 for details

l3rady commented 3 years ago

Nice, in the meantime I will work around the issue now I know what I'm looking for. Thanks

l3rady commented 3 years ago

@soulen3 just wanted to update you that the options route worked and I was able to pass three public keys -r <key1> -r <key2> -r <key3> to gpg.

This is amazing and I can finally tick off one of my jobs for encrypting our offsite backups without causing an inconvenience to our sysadmins that need access to the backups from time to time. No need to share a private key and our sysadmins can continue to use their hardware security devices to decrypt the files.