I’m glad it’s not yet me. I’m not trying to be disrespectful because I like Duplicacy and I even paid and have a current 2 year license but the documentation can be lacking and confusing.
Here is how I configured mine.
I have an sftp that I can connect to outside of duplicacy by just using my ssh key. I do not have a passphrase for my key. Just a straight up ssh or sftp connects with the key and not messing with any keyrings.
Here is how I initialized my backup.
duplicacy init -e -storage-name nachostorage -repository /home/poochie/Photos photosbackup sftp://poochie@nacho/photobackup
I like to specify a storage name but I know it’s optional. Specifying a name makes it easy to add multiple backups, etc.
Here is where duplicacy becomes confusing.
Here is the output from the init command:
$ duplicacy init -e -storage-name nachostorage -repository /home/poochie/Photos photosbackup sftp://poochie@nacho/photobackup
Enter SSH password:
Enter the path of the private key file:
No private key file is provided
Enter storage password for sftp://poochie@nacho/photobackup:***********
Re-enter storage password:***********
/home/poochie/Photos will be backed up to sftp://poochie@nacho/photobackup with id photosbackup
If you have an ssh key that works connecting to your sftp without a passphrase like I do, you have to just leave “Enter SSH password:” and “Enter the path of the private key file:” blank and just hit “enter” on your keyboard until you get to the storage password prompt. Pick a password for that.
So now you’ll want to configure duplicacy to accept your key automatically.
You have to set 3 things:
- The storage password that you chose.
- The ssh password which in my example is blank
- The location of your private ssh key. This should be your home directory’s .ssh subdirectory.
Here’s how you configure these
For the ssh password (which is blank for me)
duplicacy set -storage nachostorage -key “nachostorage_ssh_password” -value ’ ’
For the private key
duplicacy set -storage nachostorage -key “nachostorage_ssh_key_file” -value ‘/home/poochie/.ssh/id_rsa’
For the storage password
duplicacy set -storage nachostorage -key “nachostorage_password” -value ‘mysecretstoragepassword’
Obviously you need to change “nachostorage” to whatever storage name you use.
And here is the backup with NO password or key prompts.
$ duplicacy backup
Repository set to /home/poochie/Photos
Storage set to sftp://poochie@nacho/photobackup
No previous backup found
Listing all chunks
Parsing filter file /home/poochie/.duplicacy/filters
Loaded 0 include/exclude pattern(s)
Packed profile.png (133686)
Packed hat.png (50282)
Backup for /home/poochie/Photos at revision 1 completed
Also as you can see not fussing around with keyrings or any crap like that!