apps(backup): cover the remaining stateful gaps — grafana sqlite, osint pgdata, leadgen PVC, Pi WireGuard config #18
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/t_2b6639de-backup-gaps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Closes the stateful gaps left by #17 (
docs/cluster-overview.md§8.1). Everything still streams to the Linode over the WireGuard mesh ([email protected]:/root/cluster-backup, Pi artifacts to[email protected]:/root/pihost-backup) — nothing is staged on the 83 %-full T480, nothing targets the Linode public IP.grafana/grafana-<stamp>.dbmonitoring/grafana-backupCronJob0 3 * * *osint/osint-pgdata(plain Postgres Deployment)db/osint-osint-db-<stamp>.dumpPG_TARGETSloop inforgejo/cluster-backupsirius-growth/sgs-leadgen-data(4.9 MiB)leadgen-data/<stamp>/+latestsirius-growth/leadgen-backupCronJob7 3 * * */etc/wireguard+ wgportal sqlitewireguard/wireguard-<stamp>.tar.gzinfrastructure/wireguard/backup/systemd timerDesign notes
-distroless— no shell, notar, sokubectl execcannot produce a dump. The CronJob mounts the PVC read-write on siriussec and copies with the sqlite backup API (acpof a live db can capture a torn page), runsPRAGMA integrity_checkon the copy, and fails the Job if it is notok.PG_TARGETSpath:pg_dump -Fcruns inside the pod and reads its ownPOSTGRES_USER/POSTGRES_DBover the local socket — no DB password in git, in the Job, or copied across namespaces. Exec-only Role/RoleBinding inapps/base/osint/.Evidence (hand-fired runs, real output)
monitoring/grafana-backup-manual-2:integrity_check=ok dashboard=0 versions=0 user=1 alert_rule=0→ shipped 2,916,352 bytes sha2564893a879…935edd; Linodegrafana/grafana-20261119T220934Z.db. Read back from the Linode and opened with sqlite:integrity ok, 92 tables,user(admin), 2 data sources.cluster-backup-manual-5:db/osint-osint-db-20261119T220934Z.dump37,424,476 bytes sha2562348e954…, plus forgejo-data snapshot and both CNPG dumps unchanged (RESULT=success stamp=20261119T220934Z). Restored from the Linode artifact into a scratch db on the same image (TimescaleDBpre_restore/post_restorerequired — documented in §8.2): 27/27 public tables,cameras 24120=24120,articles 19653=19653.sirius-growth/leadgen-backup-manual-2: first run 5,020,406 bytes, second run 398 bytes sent, speedup 12039 (link-dest working);4.9Mon the Linode atleadgen-data/latest.wireguard-backup.service:integrity_check=ok peers=3, 8,558 bytes sha256a28cc4df…→/root/pihost-backup/wireguard/wireguard-20261119T221145Z.tar.gzmode 0600. Read back: tarball listswg0.conf,wg-remote.conf, their.bakhistory andwgportal-sqlite.db(integrity ok, 3 peers, 3 addresses); restoredwg0.confsha256 is byte-identical to the live Pi file.Honest notes
dashboard/alert_ruletables are empty and that is correct: dashboards, datasources and alert rules are provisioned from git (monitoring/controllers/home/). The db holds users/orgs/prefs/annotations/API keys.timescaledb_pre_restore()before andtimescaledb_post_restore()afterpg_restore— a naive restore drops one hypertable's data. §8.2 now says so.osint-camera-snapshots(4 K of throwaway frames), runner PVCs.infrastructure/wireguard/backup/README.md. Already installed and enabled on the Pi.