diff --git a/autorestic-backup.service b/autorestic-backup.service new file mode 100644 index 0000000..87ee27c --- /dev/null +++ b/autorestic-backup.service @@ -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 diff --git a/autorestic-backup.timer b/autorestic-backup.timer new file mode 100644 index 0000000..6c1aadd --- /dev/null +++ b/autorestic-backup.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Backup with autorestic daily +[Timer] +OnCalendar="*-*-* 03:*:*" +Persistent=true +[Install] +WantedBy=timers.target diff --git a/autorestic-prune.service b/autorestic-prune.service new file mode 100644 index 0000000..954a645 --- /dev/null +++ b/autorestic-prune.service @@ -0,0 +1,6 @@ +[Unit] +Description=Autorestic backup service (data pruning) +[Service] +Type=oneshot +ExecStart=autorestic forget --verbose --all --prune +WorkingDirectory=/srv/backups/autorestic/ diff --git a/autorestic-prune.timer b/autorestic-prune.timer new file mode 100644 index 0000000..146dc56 --- /dev/null +++ b/autorestic-prune.timer @@ -0,0 +1,7 @@ +[Unit] +Description=Prune data from the restic repository monthly +[Timer] +OnCalendar=monthly +Persistent=true +[Install] +WantedBy=timers.target