Download the appropriate binary (make sure it’s the right Linux one), e.g. with wget, and then move the files to /usr/local/bin (probably want to rename during this move to get rid of all the extra shit in the downloaded binary filename).
Then run chmod +x to make them executable, and now you’re good to run them like normal programs/commands.
Next step is to initialize duplicacy, so go to the directory you want to backup (you don’t need to go there, you can pass a flag to duplicacy, but this is simpler) and run duplicacy init -e --storage-name SOMENAME BACKUPNAME BACKUPLOCATION. The -e will ask for a password to encrypt the storage, --storage-name differentiates the backend you’re uploading to (you can have multiple), and the rest are self explanatory. At time of writing I’ve been backing up exclusively to Azure since I have free credit there, and the Azure format for duplicacy is azure://storageaccountname/containername. During the init, it will ask for the storage account key as well.
Now you can run a first time backup with duplicacy backup -stats.
Now you’ll want to save the backup password and Azure key so you don’t need to type it in all the time/be able to automate it, and this post details the way to do it. The proper way would be to setup the keyring, but historically I’ve been too lazy and have just been storing the secrets plaintext in the preferences file.
Now it’s time for duplicacy-util, which will help automate this process. In your home directory, run mkdir .duplicacy-util, then inside that folder create the files duplicacy-util.yaml and BACKUPNAME.yaml. In the first file, populate it like so:
The storage name here maps to --storage-name from earlier, and repository is the folder where you ran duplicacy init (also where the .duplicacy folder is). Refer to the duplicacy docs on how to interpret the keep entry.
Now all that’s left is adding this line to your crontab: 0 5 * * * /usr/local/bin/duplicacy-util -sd /home/rooday/.duplicacy-util -f BACKUPNAME -a -m -q. This will run the backup every day at 5 AM, and use the yaml file called BACKUPNAME. -a -m -q means run all steps (backup, prune, check), send an email, and be quiet/don’t log info lines. And that’s it!