Files
backup-agent/configs/srv.conf
T
kevin.batailleandClaude Sonnet 4.6 74390b78af feat: extract deployment config into configs/ for multi-server reuse
Both borg-backup.sh and restore.sh now source a config file instead of
hardcoding paths and container names. Default is backup.conf next to the
script; override with BACKUP_CONF=/path/to/other.conf.

- configs/srv.conf     — current server (unchanged behaviour)
- configs/nexusvoice.conf — nexusvoice server (/home/acid/nexusvoice,
                            separate Scaleway path par-backup-1/nexusvoice)
- DB steps in borg-backup.sh are now guarded on [[ -n "$DB_CONTAINER" ]]
  so a config with DB_CONTAINER="" skips the dump entirely
- RUNBOOK.md §2 documents single and multi-deployment patterns

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A3rQSEidP6Y61kaCtxjVV1
2026-08-30 23:45:10 +01:00

40 lines
1.3 KiB
Plaintext

# =============================================================================
# Deployment config: srv (primary server — /home/srv/files/content)
# Used by: borg-backup.sh, restore.sh
# Deploy: BACKUP_CONF=/opt/backup-agent/configs/srv.conf /opt/backup-agent/borg-backup.sh
# (or symlink configs/srv.conf -> ../backup.conf next to the scripts)
# =============================================================================
# === Repo & target ===
NAME="borg-2025"
REPO="/home/srv/files/backups/${NAME}"
TARGET="/home/srv/files/content"
# === Database (Docker) ===
# Set DB_CONTAINER="" to skip all DB dump steps entirely.
DB_CONTAINER="mariadb"
DUMP_SUBDIR="mariadb/dump" # relative to $TARGET; dump_db.sh writes here
DUMP_SCRIPT="/opt/backup-agent/dump_db.sh"
# === Rclone offsite mirror ===
RCLONE_REMOTE="scaleway"
RCLONE_PATH="par-backup-1/${NAME}"
RCLONE_MAX_DELETE=200
# === Credentials ===
BORG_PASSPHRASE_FILE="/root/.borg-passphrase"
ROOT_PASSWORD_FILE="/root/.mariadb-root.pw" # restore only; needs CREATE/DROP
# === Paths ===
REPO_MOUNT="" # if non-empty, checked as a mountpoint
LOCKFILE="/var/lock/borg-backup.lock"
LOGDIR="/var/log/borg"
LOG_RETENTION_DAYS=90
# === Timeouts ===
DB_START_TIMEOUT=180
CREATE_TIMEOUT="6h"
PRUNE_TIMEOUT="2h"
SYNC_TIMEOUT="12h"
CHECK_TIMEOUT="4h"