diff --git a/arch-config/.config/systemd/user/restic-backup-home.service b/arch-config/.config/systemd/user/restic-backup-home.service index 93986d4b..63112a1a 100644 --- a/arch-config/.config/systemd/user/restic-backup-home.service +++ b/arch-config/.config/systemd/user/restic-backup-home.service @@ -2,6 +2,7 @@ Description=Restic home backup [Service] Type=oneshot -ExecStart=restic -r $RESTIC_REPOSITORY unlock; restic backup --verbose --tag systemd-home.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 +ExecStartPre=-restic -r $RESTIC_REPOSITORY unlock +ExecStart=restic backup --verbose --tag systemd-home.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 ExecStartPost=restic forget --verbose --tag systemd-home.timer --group-by "paths,tags" --keep-daily $RETENTION_DAYS --keep-weekly $RETENTION_WEEKS --keep-monthly $RETENTION_MONTHS --keep-yearly $RETENTION_YEARS EnvironmentFile=%h/.restic/restic-backup-home.conf diff --git a/arch-config/.config/systemd/user/restic-backup-storage.service b/arch-config/.config/systemd/user/restic-backup-storage.service index 719848ed..f99b23a6 100644 --- a/arch-config/.config/systemd/user/restic-backup-storage.service +++ b/arch-config/.config/systemd/user/restic-backup-storage.service @@ -3,6 +3,7 @@ Description=Restic storage backup After=restic-backup-home.service [Service] Type=oneshot -ExecStart=restic -r $RESTIC_REPOSITORY unlock; restic backup --verbose --tag systemd-storage.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 +ExecStartPre=-restic -r $RESTIC_REPOSITORY unlock +ExecStart=restic backup --verbose --tag systemd-storage.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 ExecStartPost=restic forget --verbose --tag systemd-storage.timer --group-by "paths,tags" --keep-daily $RETENTION_DAYS --keep-weekly $RETENTION_WEEKS --keep-monthly $RETENTION_MONTHS --keep-yearly $RETENTION_YEARS EnvironmentFile=%h/.restic/restic-backup-storage.conf