Files
esh-pfi-infrastructure/configs/restic/irv-ml1/arbo-checkpoint.sh
T
vh c698751bee sync(restic): pull live esh-docker-vm + irv-ml1 profiles into the repo
Both hosts had live improvements the repo never recorded:
- esh-docker-vm excludes ESPHome's 539 MB of PlatformIO cache (2026-09-14).
- irv-ml1 runs /etc/restic/arbo-checkpoint.sh before the backup, a non-fatal
  SQLite online-backup of arbo's gallery DB. That script is added here too.
The live copies were correct and are the source for the next change. (Also fixes
the fv-ml1 augaman removal time to ~0130 PT.)
2026-09-27 01:38:36 -07:00

9 lines
634 B
Bash
Executable File

#!/bin/bash
# Consistent SQLite snapshot of the arbo gallery DB, run before the restic backup.
# Uses SQLite's online-backup API (safe under concurrent writes) to write
# gallery.sqlite.bak INSIDE the arbo_db volume — which is already a restic
# source (/var/lib/docker/volumes), so the consistent copy rides the daily run.
# NON-FATAL by design: a failure here (e.g. container down) must NOT abort the
# host's sole backup, hence the trailing `|| true`.
docker exec arbo python -c 'import sqlite3; s=sqlite3.connect("/data/gallery.sqlite"); d=sqlite3.connect("/data/gallery.sqlite.bak"); s.backup(d); d.close(); s.close()' || true