top | item 23070256

(no title)

Fritsdehacker | 5 years ago

I've made systemd profiles and timers to do restic backups. It's really clean and works well. Also much better testable than cron. It will most likely also work for more complex scenarios, like you're mentioning.

discuss

order

qmmmur|5 years ago

Any chance you could clue me in on the scripts? Or point me to some resources to learn systemd? I've really disliked cron since having to use it for some auto push CI/CD stuff.

ac29|5 years ago

I just set this up last week, and it works well:

https://fedoramagazine.org/automate-backups-with-restic-and-...

edit: one gotcha is that using "user" systemd units, they will only run when the user is logged in. So, for a personal device like a laptop, this is fine, but for a server, it might not do what you're thinking. For the server use case, you probably want to enable linger for that utility user, so that units will run even with no active logged in sessions:

# loginctl enable-linger username