Remove unlock. It is dangerous and should not be easily available
parent
e87c0e529b
commit
88e10a99bd
|
|
@ -49,10 +49,8 @@ some restrictions so it looks something like this:
|
||||||
## Verify backups
|
## Verify backups
|
||||||
|
|
||||||
borgwrapper verify
|
borgwrapper verify
|
||||||
## Unlock after unclean exit
|
## Remove checkpoints
|
||||||
|
Verify that you have at least one recent complete backup before doing this!
|
||||||
borgwrapper unlock
|
|
||||||
## Remove .checkpoints
|
|
||||||
|
|
||||||
borgwrapper delete-checkpoints
|
borgwrapper delete-checkpoints
|
||||||
## Run other borg commands
|
## Run other borg commands
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ OPTIONS
|
||||||
Print version and exit.
|
Print version and exit.
|
||||||
|
|
||||||
MODES
|
MODES
|
||||||
init|backup|verify|unlock|delete-checkpoints|exec
|
init|backup|verify|delete-checkpoints|exec
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,11 +104,6 @@ borg_delete_checkpoints () {
|
||||||
${BORG} delete "${BORG_REPO}"::%
|
${BORG} delete "${BORG_REPO}"::%
|
||||||
}
|
}
|
||||||
|
|
||||||
borg_unlock () {
|
|
||||||
# Use if borgbackup is not shut down cleanly and complains about lock files
|
|
||||||
${BORG} break-lock "${BORG_REPO}"
|
|
||||||
}
|
|
||||||
|
|
||||||
borg_exec () {
|
borg_exec () {
|
||||||
export BORG_REPO
|
export BORG_REPO
|
||||||
${BORG} "$@"
|
${BORG} "$@"
|
||||||
|
|
@ -262,8 +257,6 @@ mkdir -p "${LOCKDIR}"
|
||||||
exit_verify 0
|
exit_verify 0
|
||||||
elif [[ ${MODE} == "delete-checkpoints" ]]; then
|
elif [[ ${MODE} == "delete-checkpoints" ]]; then
|
||||||
borg_delete_checkpoints
|
borg_delete_checkpoints
|
||||||
elif [[ ${MODE} == "unlock" ]]; then
|
|
||||||
borg_unlock
|
|
||||||
elif [[ ${MODE} == "exec" ]]; then
|
elif [[ ${MODE} == "exec" ]]; then
|
||||||
if [[ $# -le 1 ]]; then
|
if [[ $# -le 1 ]]; then
|
||||||
>&2 echo "ERROR: No borg arguments given"
|
>&2 echo "ERROR: No borg arguments given"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue