fix(restic): dump every database, not just Forgejo's (#928) #959
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/infrastructure!959
Loading…
Reference in a new issue
No description provided.
Delete branch "ops/928-db-dumps"
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?
Closes #928. Deploy-side counterpart is coilyco-bridge/deploy#794, where Teable is now running, so this is ordered before it holds real rows.
The half-change this fixes
infrastructure#951 added
teabletoRESTIC_BACKUP_NAMESPACESwithout a dump entry. That is precisely the failure #928 was filed to prevent, and it is live today: PVC discovery hands Resticteable-db-data, a live PostgreSQL data directory, as a raw file copy taken while the database is writing. Restic snapshots it happily and reports success, and it may not restore.teable-assetswas correctly captured by that change. The database was not, and the backup would have looked complete.What changed
create_forgejo_db_dumpwas hardcoded to one namespace, target, user, and database. It is nowcreate_db_dumpdriven by:staging at
<root>/<namespace>/<database>.pgdump. That is where forgejo's dump already lived, so the on-disk layout and existing snapshots are unchanged, and nothing outside the script sets the oldRESTIC_BACKUP_FORGEJO_DB_*variables.Behaviour preserved: a failed or empty dump aborts before Restic runs. Behaviour added: a namespace that does not exist is skipped rather than failed, matching what PVC discovery already does for an undeployed service.
teable's user and database are
teable, and the target isdeployment/teable-db, read fromservices/teable/deploy/teable-datastore.ymlrather than assumed.The harness moved with it
#928 named this as the reason not to do the change casually: the old harness asserted the exact string
exec statefulset/forgejo-db -- pg_dump -Fc -U forgejo -d forgejo, so generalising the script alone would have left the tested default and the real default free to diverge.It now drives both namespaces through the script's own default list rather than a second copy, and adds a drift guard: a namespace in the default backup set with no dump entry fails the test unless it is in
namespaces_without_databases, todayregistryalone.Both controls were verified to fire, not assumed
namespace somedb is in the backup set with no dump entry.Restored and re-ran clean after each.
just restic-backup-testpasses, andpre-commit runover the changed files is clean.Not done here
The real run is attended and lands on kai-server via #923.
just restic-backup-testis offline by construction and touches neither k3s nor restic, so #928's done-condition of "a real run produces a non-emptyteable.pgdump" is still outstanding and needs that attended run.