devops: nightly backup pipeline — pg_dump + mc mirror over Tailscale to heim-nas #502
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Background
PR #499 lands the production deployment but explicitly defers the backup pipeline. The rollback procedure in
docs/DEPLOYMENT.md§5 notes that manual backups are the only recovery option until this ships. Named volumes (postgres-data,minio-data) without a tested restore path are a single point of failure for the family archive.This was flagged by Tobi (DevOps review on PR #499, comment #8352) and Elicit (Requirements, comment #8356, OQ-3).
The target topology is documented in ADR-010 (docs/adr/010-minio-self-hosted-not-hetzner-obs.md): backup is the long-term safety net that lets MinIO stay self-hosted without giving up durability.
Scope
Add a cron-driven backup pipeline running on the production VPS:
pg_dump -Fcof thearchivdatabase, written to a local backup directory with date-stamped name (archiv-YYYYMMDD.dump).mc mirror --removefrom localmyminio/familienarchivto a destination MinIO instance onheim-nasreached over Tailscale (private subnet, no public internet hop).rsyncof the Postgres dump directory to the sameheim-nasdestination over Tailscale.docs/DEPLOYMENT.md— operator can verify restore quarterly by spinning up a sandbox stack from the latest dump.Acceptance criteria
heim-nasis reachable only from the production VPS's Tailscale identityThreat model considerations (Nora to review when work lands)
mc mirror --removeis destructive on the destination — if the source is compromised and emptied, the destination follows. Mitigation: keep--removeoff and rotate destination snapshots independently, OR run a separate immutable snapshot job onheim-nas.References