Merge "Update backup verifier to handle purged repos"

This commit is contained in:
Zuul 2024-11-25 17:43:52 +00:00 committed by Gerrit Code Review
commit ab8ab90e14

View File

@ -7,7 +7,15 @@ export SHELL=/bin/bash
pushd /opt/backups
for u in borg-*; do
BORG_REPO=/opt/backups/$u/backup
BORG_BASE=/opt/backups/$u
BORG_REPO=${BORG_BASE}/backup
BORG_RETIRED=${BORG_BASE}/.retired
if [[ -f "${BORG_RETIRED}" ]] && [[ ! -d "${BORG_REPO}" ]]; then
# This repo was retired and purged. We don't need to verify it.
echo "$(date) Skipping ${BORG_REPO} it is retired and purged."
continue
fi
sudo BORG_RELOCATED_REPO_ACCESS_IS_OK=y BORG_REPO=${BORG_REPO} -u ${u} -s <<'EOF'