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>
This commit is contained in:
parent
0d6584f3c3
commit
71d5759eb5
1 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,9 @@ db_path=${4:?missing db path}
|
|||
name=${5:?missing name}
|
||||
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"'"))'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue