Wire ringtail blumeops-pg into backups + Grafana #364

Merged
eblume merged 5 commits from backup-grafana-ringtail-blumeops-pg into main 2026-06-03 12:25:31 -07:00
Showing only changes of commit 71d5759eb5 - Show all commits

borgmatic: stage SQLite dump beside source DB (minimal images lack /tmp)

The helper wrote its staging copy to /tmp, but minimal nix images (mealie)
have no /tmp, so the dump failed 'unable to open database file'. Write it
next to the source DB instead (always on a writable volume); works for any
image, shower included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Erich Blume 2026-06-03 11:32:17 -07:00

View file

@ -28,7 +28,9 @@ db_path=${4:?missing db path}
name=${5:?missing name} name=${5:?missing name}
dump_target=${6:?missing dump target} dump_target=${6:?missing dump target}
pod_tmp="/tmp/${name}-backup.db" # Stage the backup next to the source DB (a guaranteed-writable volume);
# minimal nix images (e.g. mealie) have no /tmp.
pod_tmp="$(dirname "$db_path")/.borgmatic-backup-${name}.db"
python_backup='import sqlite3; sqlite3.connect("'"$db_path"'").backup(sqlite3.connect("'"$pod_tmp"'"))' python_backup='import sqlite3; sqlite3.connect("'"$db_path"'").backup(sqlite3.connect("'"$pod_tmp"'"))'