fix(restic): if repository exists but is locked, ensure it is unlocked
This commit is contained in:
parent
ed95d4fd3d
commit
4bddc95161
@ -6,9 +6,9 @@ if [[ -n ${RESTIC_PRE_BACKUP_HOOK-} ]]; then
|
|||||||
/bin/bash -c "$RESTIC_PRE_BACKUP_HOOK"
|
/bin/bash -c "$RESTIC_PRE_BACKUP_HOOK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "List existing snapshots or initialize repository"
|
echo "List existing snapshots or attempt to initialize/unlock repository"
|
||||||
restic snapshots || restic init
|
restic snapshots || restic init || restic unlock
|
||||||
sleep 2;
|
sleep 1;
|
||||||
|
|
||||||
echo "Attempting to remove lock if present"
|
echo "Attempting to remove lock if present"
|
||||||
restic unlock
|
restic unlock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user