Skip to content

Commit

Permalink
Merge pull request #739 from nils-werner/systemd-timers
Browse files Browse the repository at this point in the history
Systemd timers for backup and forget
  • Loading branch information
aawsome authored Jul 9, 2023
2 parents 74b6c5b + f3c5d56 commit 40da0fc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions util/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=rustic --use-profile %I backup

[Service]
Nice=19
IOSchedulingClass=idle
KillSignal=SIGINT
ExecStart=/usr/bin/rustic --use-profile %I backup
12 changes: 12 additions & 0 deletions util/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Daily rustic --use-profile %I backup
Wants=rustic-forget@%i.timer

[Timer]
OnCalendar=daily
AccuracySec=1m
RandomizedDelaySec=1h
Persistent=true

[Install]
WantedBy=timers.target
6 changes: 6 additions & 0 deletions util/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Unit]
Description=rustic --use-profile %I forget

[Service]
KillSignal=SIGINT
ExecStart=/usr/bin/rustic --use-profile %I forget
12 changes: 12 additions & 0 deletions util/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Monthly rustic --use-profile %I forget
PartOf=rustic-backup@%i.timer

[Timer]
OnCalendar=monthly
AccuracySec=1m
RandomizedDelaySec=1h
Persistent=true

[Install]
WantedBy=timers.target

0 comments on commit 40da0fc

Please sign in to comment.