backup(portal): barman-cloud PITR via a Linode-side Garage WAL archive
sirius-growth/portal had a 24h-RPO pg_dump and no way to roll forward. This adds continuous WAL archiving + a daily base backup into a second, independent Garage node on the Linode (bucket pg-wal-archive, 10.10.0.5:3900, WireGuard-only), and proves a restore to a point in time end to end. - infrastructure/garage-linode/: podman+quadlet unit (the Linode is a kubelet node, no docker), garage.toml bound to 10.10.0.5 only, nft guard in PREROUTING -140, install.sh, README with the measured disk sizing, pitr-restore.md with the rehearsal transcript. - apps/base/sirius-growth/cluster.yaml: spec.backup.barmanObjectStore (destinationPath s3://pg-wal-archive, gzip WAL+data, retentionPolicy 14d), credentials from Secret sirius-growth/portal-wal-s3 (out of band, not in git). - apps/base/sirius-growth/scheduled-backup.yaml: ScheduledBackup portal-daily, 03:20 UTC, six-field cron. - docs/cluster-overview.md: §5.1 the WAL store, §8.1 coverage + sizing + gaps, §8.3 the PITR restore recipe. forgejo/pg is deliberately left on pg_dump only (a day of git history is annoying, not costly); portal keeps its nightly dump as the logical second copy. Rehearsed 2026-11-19: marker row at 22:35:06Z, unwanted row at 22:35:28Z, throwaway cluster restored to targetTime 22:35:15Z came back with the marker and without the later row. See infrastructure/garage-linode/pitr-restore.md.
This commit is contained in:
parent
95d807852c
commit
953be9f3cf
12 changed files with 801 additions and 9 deletions
20
infrastructure/garage-linode/host/install-wal-archive-firewall.sh
Executable file
20
infrastructure/garage-linode/host/install-wal-archive-firewall.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
# Install the WAL-archive inbound guard on the Linode hub. Idempotent.
|
||||
#
|
||||
# sudo ./install-wal-archive-firewall.sh
|
||||
#
|
||||
# Verifies the table afterwards instead of trusting `systemctl start`'s exit 0.
|
||||
set -euo pipefail
|
||||
|
||||
here=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
install -D -m 0644 "$here/wal-archive-firewall.nft" /etc/nftables.d/wal_archive_guard.nft
|
||||
install -D -m 0644 "$here/wal-archive-firewall.service" /etc/systemd/system/wal-archive-firewall.service
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now wal-archive-firewall.service
|
||||
|
||||
nft list table inet wal_archive_guard >/dev/null
|
||||
nft list table inet wal_archive_guard | grep -q 'dport { 3900, 3903 }'
|
||||
echo "OK: wal_archive_guard loaded"
|
||||
nft list table inet wal_archive_guard
|
||||
Loading…
Reference in a new issue