apps(backup): nightly Forgejo data + CNPG dumps to the Linode, and prove a restore #17
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/t_dcad85f6-backups"
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?
Nothing backed up Forgejo or the CloudNativePG databases. This adds one nightly path and exercises a restore.
What runs: CronJob
forgejo/cluster-backup,37 2 * * *UTC,Forbid, destination[email protected]:/root/cluster-backupover the WireGuard mesh (never the public IP, never a PV on the same disk).forgejo-dataPVC →rsync -a --delete --link-dest=../latestsnapshot mirror, read-only mount, transient upload spools excluded, rsync exit 24 tolerated (Forgejo is live while it copies).forgejo/pgandsirius-growth/portal→pg_dump -Fc -Z6run inside the CNPG primary over the local socket (no DB password in git or in the Job), sha256 compared local-vs-remote before the.partrename.manifests/<stamp>.txt(sizes + checksums) remotely; retention 7 data snapshots / 14 dumps; remote free-space guard (8 GiB min).ephemeral-storage: 1Giso a regression cannot stage the PVC on the T480.forgejo(a PVC cannot be mounted cross-namespace); the portal dump uses exec-only RBAC declared inapps/base/sirius-growth/backup-exec-rbac.yaml.forgejo/cluster-backup-ssh— out of band, not in git; ed25519 keyfrom=-restricted on the Linode, host key pinned.Verified live (hand-fired Job
cluster-backup-manual-3):RESULT=success; first full mirror 19 GiB then an incremental run sending 4.4 MB (speedup 4290, hardlinked snapshots:dutotal 19 G for 3 snapshots); dumpsforgejo-pg10,133,865 B sha 6252104…,sirius-growth-portal178,932 B. Restore rehearsal: pulled the dump back from the Linode into a throwaway Postgres pod →repository=1225 user=5811 issue=402 pull_request=392 tables=130(matches live 1225/5811/402/392).docs/cluster-overview.md§8.1 now states what is covered and the honest gaps (Grafana sqlite, osint pgdata, sgs-leadgen-data, Pi/etc/wireguard), §8.2 the restore runbook.