restic-backup: unlock stale locks before backing up
A backup killed mid-run leaves a lock behind; the next night's backup still works (non-exclusive) but forget fails and the run reports rc=1 for ever. restic-maintenance.sh already did this. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
1ab7337d22
commit
bab0ae5386
@@ -149,6 +149,10 @@ fi # stage dumps
|
|||||||
|
|
||||||
if [ "$STAGE" = all ] || [ "$STAGE" = backup ]; then
|
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"
|
log "restic backup -> $REPO"
|
||||||
$RESTIC -r "$REPO" backup \
|
$RESTIC -r "$REPO" backup \
|
||||||
--pack-size 64 --read-concurrency 8 -o s3.connections=8 \
|
--pack-size 64 --read-concurrency 8 -o s3.connections=8 \
|
||||||
|
|||||||
Reference in New Issue
Block a user