Backup enable encryption

I have a backup job which uses no encryption as I started with that setting long time ago

from searching I found that you can’t change the once set AES password of a backup but no answer to my question:
what about you have an unencrypted backup job like me can I just set a password to my backup job without breaking saved backups?
or is the only way to create a new job with encryption enabled?

Welcome to the forum @dupli

I suspect the answer is unfortunately the same as the change-password question (anyone disagree?).

What storage type is your Destination? If you can look, you’ll see .zip files. Encrypted uses .zip.aes
You can also see the actual file names in <job> → Show log → Remote to confirm yours are just .zip

While I can’t guarantee that nobody will have a workaround (you probably saw some creative methods while looking at the change-password issue), it looks unlikely. I tried just encrypting the remote backup (using the independent-but-compatible AES Crypt tool), tried out Recreate and Repair, and found that Duplicati could sort of awkwardly handle the remote file name change, but not the remote size change.

A dindex file records both the name and size of the dblock file that it indexes, and both values changed. Sometimes Duplicati can re-upload deleted dindex files from its database, but seemingly not when they never were known, e.g. if I just delete them and have Duplicati Recreate using just dlist and dblock files.

Maybe somebody else knows some way to get dindex files in the backup. They’re rather important files.

Confirmed, adding a password to an existing backup is not supported:

Capture

It is possible. There is a python script which downloads, decrypts if needed and encrypts afterwards. You can even change from aes to gpg. Don’t have the link but it resides on duplicati github.

Yeah I remember that script. Something a brave person can certainly try, but it is still unsupported…

If it is unsupported, it should be removed from github, right?

Not my call at all, but I don’t know who would provide assistance to the OP if they needed it.

thanks for the infos
I didn’t find that mentioned script but I found this one which sounds like it could be done

https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/#duplicaticommandlinerecoverytoolexe

instead of playing around with this tool, it maybe would be faster just to clone the backup job and set a password, and let the rest duplicati do from scratch

Here’s the script:

thanks a lot
I tried it and it looks like it worked perfectly, I think the speedup compared to starting the backup over again was immense, even I had to rebuild the database 2 times as it got stuck the first time

update: but have to investigate more as a restore gave some errors

Five days later, I’m gonna bet you could have redone the backup from scratch twice over.

Just sayin’ :innocent:

I guess you could be right, as I am thinking of just redoing the backup from scratch anyway, as those steps to make sure it really worked not really speed up anything in the end :slight_smile:

Go forth and succumb to the sunk-cost fallacy no more.

Great! Glad it worked out for you!