added autorestic units.

This commit is contained in:
L. Kraven
2024-06-13 21:50:49 -07:00
parent 1f351de915
commit 3314ca5c4a
4 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Autorestic backup service
[Service]
Type=oneshot
ExecStart=autorestic backup --verbose --all
ExecStartPost=autorestic forget --verbose --all
WorkingDirectory=/srv/backups/autorestic

7
autorestic-backup.timer Normal file
View File

@@ -0,0 +1,7 @@
[Unit]
Description=Backup with autorestic daily
[Timer]
OnCalendar="*-*-* 03:*:*"
Persistent=true
[Install]
WantedBy=timers.target

6
autorestic-prune.service Normal file
View File

@@ -0,0 +1,6 @@
[Unit]
Description=Autorestic backup service (data pruning)
[Service]
Type=oneshot
ExecStart=autorestic forget --verbose --all --prune
WorkingDirectory=/srv/backups/autorestic/

7
autorestic-prune.timer Normal file
View File

@@ -0,0 +1,7 @@
[Unit]
Description=Prune data from the restic repository monthly
[Timer]
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=timers.target