Running duplicacy daemon on macOS

Hi!

I recently worked on setting up backups for my macOS environment using duplicacy. While researching, I saw different suggestions about launchd plist configs and ways to implement monitoring.

I decided to compile my research into a python codebase that would allow anyone on a macOS environment to configure duplicacy to run as a launchd daemon on a schedule. The scripts use only stdlib and should be runnable without any external dependencies, except for duplicacy. Here is the GitHub link:

The solution I went with was:

  • You call sudo ./install.py --repository-path /path/to/repository, which generates the plist, lays out dependencies, and loads the daemon into launchd
  • A simple python script validates the environment and launches a duplicacy backup
  • After the backup, the script reports to healthchecks.io if the ping url was specified

I decided to put a script on top of duplicacy instead of relying on duplicacy pre/post scripts to have more control and extendibility for the future.

Anyways I hope this solution or parts of the implementation could help someone in the future. Let me know what you think!

1 Like