Save Security Key

Hi

I have backup scripts running as scheduled tasks. However some of these are failing to run as the storage (encryption) password is being asked for. When I enter this, it does not always seem to save.

I have tried saving the key by running set -key duplicacy_password -value “encryption password”, but receive an access is denied message for editing the preferences file. The user account running this command does have the required privileges to edit the preferences file.

Any help would be appreciated.

To start with: what operating system are you using?

And then you could look at the topics tagged #scripting. You can also take a look at this part of the user guide or search the forum for “password”.

I’m having this problem on Windows Server 2012 and SBS 2011, I’ve followed the user guide for saving credentials but I’m either getting an access is denied message, or it saves successfully, but then the backup job still asks for the storage password.

Can you post here how you ran the command and the output (with credentials redacted)? If the prefereneces file gets saved successfully but Duplicacy still asks for password, post the content of the preferences file too.

I have now managed to run the command "duplicacy set -key duplicacy_password -value “encryptionpassword” successfully.

However when running the backup, I am still being asked for the encryption password, and on some servers the Backblaze (the cloud storage I’m using) ID and password.

My preferences file is as follows: "[
{
“name”: “default”,
“id”: “Companyfiles”,
“repository”: “”,
“storage”: “b2://backblazestorageurl”,
“encrypted”: true,
“no_backup”: false,
“no_restore”: false,
“no_save_password”: false,
“nobackup_file”: “”,
“keys”: {
“duplicacy_B2_ID”: “myID”,
“duplicacy_B2_Key”: “mykey”,
“duplicacy_password”: “correctencryptionpassword”
}
}
]

When I navigate to the folder containing the companyfiles and run “duplicacy backup -threads 6” I am asked for the Backblaze account ID, key, and encryption password

I also do not want the Backblaze key and storage password being stored in plaintext!

Where am I going wrong?

Many thanks

Remove duplicacy_ from your key names and make them lowercase.

See more details here:

In your example:

[
    {
        “name”: “default”,
        “id”: “Companyfiles”,
        “repository”: “”,
        “storage”: “b2://backblazestorageurl”,
        “encrypted”: true,
        “no_backup”: false,
        “no_restore”: false,
        “no_save_password”: false,
        “nobackup_file”: “”,
        “keys”: {
            “b2_id”: “myID”,
            “b2_key”: “mykey”,
            “password”: “correctencryptionpassword”
         }
   }
]
1 Like

On Windows you shouldn’t need to store passwords this way. They should be stored in the keyring file automatically after you enter them for first time. It you get an access is denied message that means you don’t have the permission to access the keyring file. This is important: you should be running Duplicacy under the same account otherwise passwords stored by one account can’t be read by others.

1 Like