diff --git a/README.md b/README.md index cd44ebd..ccf3782 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,6 @@ some restrictions so it looks something like this: ## Verify backups borgwrapper verify -## Remove checkpoints -Verify that you have at least one recent complete backup before doing this! - - borgwrapper delete-checkpoints ## Run other borg commands ### Wrapped and easy Use `exec `. `BORG_REPO` is exported to the environment so use `::` when the repo diff --git a/src/borgwrapper b/src/borgwrapper index 13c5ad5..943cbc8 100755 --- a/src/borgwrapper +++ b/src/borgwrapper @@ -15,7 +15,7 @@ OPTIONS Print version and exit. MODES - init|backup|verify|delete-checkpoints|exec + init|backup|verify|exec EOF } @@ -90,17 +90,6 @@ borg_verify () { ${BORG} check "${BORG_CHECK_ARGS[@]}" "${BORG_REPO}" } -borg_delete_checkpoints () { - local DELETE_ARGS=() - - ${DRY_RUN} && DELETE_ARGS+=( --dry-run ) - ${BORG} list "${BORG_REPO}" \ - | { grep .checkpoint || true; } \ - | cut -d ' ' -f 1 \ - | xargs -I % -n 1 --no-run-if-empty \ - ${BORG} delete "${DELETE_ARGS[@]}" "${BORG_REPO}"::% -} - borg_exec () { export BORG_REPO ${BORG} "$@" @@ -240,8 +229,6 @@ mkdir -p "${LOCKDIR}" trap 'exit_verify $?' ERR INT TERM borg_verify exit_verify 0 - elif [[ ${MODE} == "delete-checkpoints" ]]; then - borg_delete_checkpoints elif [[ ${MODE} == "exec" ]]; then if [[ $# -le 1 ]]; then >&2 echo "ERROR: No borg arguments given"