These are some systemd .service and .timer scripts that I use for personal backups. Here is how to set them up and monitor them.
- Initialize a borg repo:
borg init --encryption none ~/Backup/borg/host-user-repo
2. Use a custom borg-backup-topic.{service,timer} pair of scripts to set up what to back up and how often. Copy both to user's systemd scripts and then enable/start timers:
sudo cp borg-backup-topic.service /etc/systemd/user
sudo cp borg-backup-topic.timer /etc/systemd/user
systemctl --user enable borg-backup-topic.timer
systemctl --user start borg-backup-topic.timer
Warning
If you are running services with superuser privileges, repeat all the subsequent commands without the --user switch.
Make sure the timers are enabled and running:
systemctl --user list-timers --all
Make sure the services are ok:
systemctl --user status borg-backup-topic