From 40b839a5b95d034ac28d2bca32b5107eb592d1fd Mon Sep 17 00:00:00 2001 From: capntack Date: Sun, 24 Mar 2024 10:36:20 -0500 Subject: [PATCH] Fixed where unlock commands are --- templates/resticCleanTemplate.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/resticCleanTemplate.sh b/templates/resticCleanTemplate.sh index 955ba0e..81fa49a 100644 --- a/templates/resticCleanTemplate.sh +++ b/templates/resticCleanTemplate.sh @@ -3,24 +3,26 @@ # Run retention policy # Remove tags if you want to run against the entire repo +# Remove any stale locks on repo +restic unlock + if [ $RESTIC_CALENDAR_RETENTION = 'yes' ]; then - restic unlock restic forget --prune --verbose \ --tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \ --keep-daily "${RESTIC_RETENTION_DAYS}" \ --keep-weekly "${RESTIC_RETENTION_WEEKS}" \ --keep-monthly "${RESTIC_RETENTION_MONTHS}" \ --keep-yearly "${RESTIC_RETENTION_YEARS}" - restic unlock fi if [ $RESTIC_CALENDAR_RETENTION = 'no' ]; then - restic unlock restic forget --prune --verbose \ --tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \ --keep-last "${RESTIC_RETENTION_KEEP_LAST}" - restic unlock fi # Verify the repo's integrity -restic check --verbose \ No newline at end of file +restic check --verbose + +# Ensure lock from above actions is removed +restic unlock \ No newline at end of file