Init should ask the user to enter password instead of erroring

Would be nice to mention in Init command details that -e has to be provided even if I want to restore from a remote repository. For instance if I was trying to restore from an encrypted repository in an SFTP:
duplicacy init test sftp://user@someremotelocation.com//mnt/Backup/duplicacy-backup

this command would fail telling:

Failed to download the configuration file from the storage: The storage is likely to have been initialized with a password before

By providing the -e switch, and before setting the correct password with
export DUPLICACY_PASSWORD
duplicacy init test sftp://user@someremotelocation.com//mnt/Backup/duplicacy-backup -e

The repository was correctly initialized and I was able to restore a revision.

2 Likes

I believe :d: would be even more user friendly if: in the case where the storage is encrypted, and init is run on that storage without the -e flag, :d: will not error out, but instead say that the storage is encrypted and kindly ask the user to enter his encryption password.

With this, :d: will spare its user the trouble to rerun the init command just to add the -e flag.

6 Likes

Agree! :slight_smile:
Another related thing, if -e is specified, I think :d: should not accept blank password.
(causes preferences to say storage is encrypted -> confucion)

3 Likes