fix: point dump_db.sh at its /opt/backup-agent deploy path, remove healthcheck

dump_db.sh no longer lives under $TARGET, so its own default dump
directory (relative to wherever the script is) would land outside the
backed-up tree. Pin DUMP_SCRIPT to /opt/backup-agent/dump_db.sh and
export DUMP_DIR explicitly so dumps still land in $TARGET/mariadb/dump
regardless of where the script itself is deployed.

Also drop the healthcheck integration (HEALTHCHECK_URL, send_healthcheck,
curl requirement) from borg-backup.sh per request - no monitoring hook
wanted for now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
kbe
2026-07-25 21:30:17 +02:00
co-authored by Claude Sonnet 5
parent b8564703bc
commit dd4fd8cb9c
3 changed files with 11 additions and 8 deletions
+6 -2
View File
@@ -25,6 +25,12 @@ NAME="borg-2025"
REPO="/home/srv/files/backups/$NAME"
TARGET="/home/srv/files/content"
# dump_db.sh lives with the rest of this toolkit, not inside $TARGET - its
# own default dump dir is relative to wherever IT lives, so DUMP_DIR must be
# passed explicitly (below) to keep dumps inside $TARGET where borg can see them.
DUMP_SCRIPT="/opt/backup-agent/dump_db.sh"
export DUMP_DIR="${TARGET}/mariadb/dump"
REPO_MOUNT=""
LOGDIR="/var/log/borg"
@@ -217,8 +223,6 @@ preflight
# --- 1. Logical dumps (container stays up the whole time) ---------------
step "Step 1: MariaDB dumps"
DUMP_SCRIPT="${TARGET}/mariadb/dump_db.sh"
DUMP_DIR="${TARGET}/mariadb/dump"
if [[ ! -x "$DUMP_SCRIPT" ]]; then
log "ERROR: dump script missing or not executable: $DUMP_SCRIPT"