diff --git a/restic-backup.sh b/restic-backup.sh index 0741497..1549d25 100755 --- a/restic-backup.sh +++ b/restic-backup.sh @@ -149,6 +149,10 @@ fi # stage dumps if [ "$STAGE" = all ] || [ "$STAGE" = backup ]; then +# clear locks left by a killed run (safe: only stale ones are removed); +# otherwise a single interrupted backup blocks forget/prune for ever +$RESTIC -r "$REPO" unlock >/dev/null 2>&1 || true + log "restic backup -> $REPO" $RESTIC -r "$REPO" backup \ --pack-size 64 --read-concurrency 8 -o s3.connections=8 \