I made a backup using duplicati-cli (version 2.0.6.3_beta_2021-06-17), with a passphrase set using the --passphrase argument.
I’m now trying to supply it through the environment variable PASSPHRASE, but it seems to be ignored, as I get this error:
ErrorID: PassphraseChangeNotSupported
You have attempted to change a passphrase to an existing backup, which is not supported. Please configure a new clean backup if you want to change the passphrase.
I tried in both this way, but the result is the same:
I’m guessing this is a bash script? Do you have any special characters in your password that bash may be interpreting/processing? (Like a $ for example.) If so you might need to escape those characters.
Supply a passphrase that Duplicati will use to encrypt the backup volumes, making them unreadable without the passphrase. This variable can also be supplied through the environment variable PASSPHRASE .
I tested it out and it works for me. I exported one of my web UI jobs as command line and removed the --passphrase=xxxx part. Then I did export PASSPHRASE="xxx" and ran the command and it worked as expected:
I’m confused. Was the error there without that? If not, the addition was not ignored.
Of course, you’d also like it to do what you want. Maybe it’s time to test decryption:
mono /usr/lib/duplicati/SharpAESCrypt.exe d <passphrase> <full-path-to-aes-file> > /dev/null
Was it an Export As Command-line from a GUI job, or completely hand-built (harder to do right)?
I figured out what my problem was; nothing wrong with duplicati, the problem is that I was running duplicates with sudo, and thus the environment variable was not being passed. I therefore had to use sudo -E duplicati-cli [...].