Duplicacy with Backblaze B2 pt.2

In my previous blogpost I wrote how I transitioned from using the aws-cli to using encrypted backups with duplicacy instead.

Since then I've just been having some fun with the cron that actually takes the backups using the bash script I wrote. I decided to transition it to a typescript project just for fun and fletching it out a bit more.

Have a look here. It pretty much does the same as the bash script did but better. The main difference is that everything is now configurable. From the amount of days (snapshots) that need to be kept to how long the script should retry while there is a lock caused by a different instance.

Talking about a lockfile, it still places a lock on the script to await execution of the first instance that is still running (it stops retrying after a default of 5 minutes).

Usage is slightly different but quite the same:

Notice that I can now configure the amount of days that snapshots need to be kept per repository and that the second instance will retry for 10 minutes before giving up if the first backup takes too long.