From f4bd8572aeaf990d7c2dc691446fccbc87961fd7 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sat, 29 May 2021 17:19:42 +0200 Subject: [PATCH] Unlock repo every time --- arch-config/.config/systemd/user/restic-backup-home.service | 2 +- arch-config/.config/systemd/user/restic-backup-storage.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch-config/.config/systemd/user/restic-backup-home.service b/arch-config/.config/systemd/user/restic-backup-home.service index 0ef95d4c..93986d4b 100644 --- a/arch-config/.config/systemd/user/restic-backup-home.service +++ b/arch-config/.config/systemd/user/restic-backup-home.service @@ -2,6 +2,6 @@ Description=Restic home backup [Service] Type=oneshot -ExecStart=restic backup --verbose --tag systemd-home.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 +ExecStart=restic -r $RESTIC_REPOSITORY unlock; 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 b87d48ee..719848ed 100644 --- a/arch-config/.config/systemd/user/restic-backup-storage.service +++ b/arch-config/.config/systemd/user/restic-backup-storage.service @@ -3,6 +3,6 @@ Description=Restic storage backup After=restic-backup-home.service [Service] Type=oneshot -ExecStart=restic backup --verbose --tag systemd-storage.timer $BACKUP_EXCLUDES $BACKUP_PATHS --limit-upload=2048 +ExecStart=restic -r $RESTIC_REPOSITORY unlock; 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