Fixed where unlock commands are

release/full-rewrite
capntack 6 months ago
parent 59ff891b9b
commit 40b839a5b9

@ -3,24 +3,26 @@
# Run retention policy # Run retention policy
# Remove tags if you want to run against the entire repo # Remove tags if you want to run against the entire repo
if [ $RESTIC_CALENDAR_RETENTION = 'yes' ]; then # Remove any stale locks on repo
restic unlock restic unlock
if [ $RESTIC_CALENDAR_RETENTION = 'yes' ]; then
restic forget --prune --verbose \ restic forget --prune --verbose \
--tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \ --tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \
--keep-daily "${RESTIC_RETENTION_DAYS}" \ --keep-daily "${RESTIC_RETENTION_DAYS}" \
--keep-weekly "${RESTIC_RETENTION_WEEKS}" \ --keep-weekly "${RESTIC_RETENTION_WEEKS}" \
--keep-monthly "${RESTIC_RETENTION_MONTHS}" \ --keep-monthly "${RESTIC_RETENTION_MONTHS}" \
--keep-yearly "${RESTIC_RETENTION_YEARS}" --keep-yearly "${RESTIC_RETENTION_YEARS}"
restic unlock
fi fi
if [ $RESTIC_CALENDAR_RETENTION = 'no' ]; then if [ $RESTIC_CALENDAR_RETENTION = 'no' ]; then
restic unlock
restic forget --prune --verbose \ restic forget --prune --verbose \
--tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \ --tag "${RESTIC_TAG_01}","${RESTIC_TAG_02}" \
--keep-last "${RESTIC_RETENTION_KEEP_LAST}" --keep-last "${RESTIC_RETENTION_KEEP_LAST}"
restic unlock
fi fi
# Verify the repo's integrity # Verify the repo's integrity
restic check --verbose restic check --verbose
# Ensure lock from above actions is removed
restic unlock
Loading…
Cancel
Save