Restoration
Index of restoration scenarios — pick one based on what failed and what you're trying to bring back.
There are four common restore scenarios (plus an opt-in object-store path). Pick one:
Postgres PITR
A bad migration, accidental DROP TABLE, or DELETE without WHERE. You want to roll back the database to a specific moment.
Single PVC
One application's data is corrupt or accidentally wiped, but the cluster and other apps are fine. Common case: Keycloak realm exports, PVC-backed MinIO.
Etcd in-place
The cluster's control plane is broken (etcd corrupted, master crashed without redundancy) but the compute node and its disk are reusable.
Full rebuild
Disaster — node(s) destroyed, hardware lost. Build fresh and layer backups onto it.
Object store
MinIO/S3 content was backed up with groups.objectstore: true (rclone + restic). Restore the bucket tree onto the backup host, then copy into MinIO.
General principles
Where restore lands depends on the component:
nfs / rancher / configs (RP tags) — orchestrator places data on the live target (new storage NFS or RP).
etcd — snapshot is copied onto compute; cluster-reset remains a manual maintenance step.
pg — staged on storage; cutover follows the postgres runbook.
objectstore — staged on the backup host only (no push into MinIO).
Use --dry-run first. Every restore subcommand supports --dry-run, which prints what would happen without doing it.
Keep the keystore handy. Every restore needs the same passphrases used at backup time. Losing the passphrase = losing the backup. If objectstore was enabled, also keep rclone.conf / objectstore-restic.pass (or /etc/openg2p-backup/restic-objectstore.env on the backup host).
Don't run two restores in parallel. Especially across components — the relationships between PG, NFS data, and PV/PVC bindings matter. Restore PG → restore NFS → reconcile PV/PVCs → restart pods.
One --component per invoke. restore requires a single group (pg, etcd, rancher, nfs, configs, or objectstore). There is no restore --component all.
Choosing a restore order
For a partial loss (one app):
Restore that app's PVC (single-pvc.md)
Restart the app's pods
For a full rebuild:
Provision fresh nodes + run
openg2p-prod.sh installto get the platform backRestore Postgres (postgres-pitr.md — omit
--point-in-timefor latest; the script uses pgBackRest--type=immediate)Restore Kubernetes resources (full-rebuild.md Step 5 —
restore --component rancher --point-in-time <cutoff>pulls tarball from backup-host restic onto new NFS)Restore NFS PVC data (single-pvc.md;
restore --component nfspushes onto each Bound PVsubDir; pin--point-in-time <snapshot-id>if needed)If
groups.objectstorewas enabled, restore object-store snapshots onto the backup host (below), then sync into MinIO yourselfOptionally restore RP configs (
wireguard/nginx/openg2p) — they push onto the RP nodeRestart workloads, verify
After a storage rebuild, update Keycloak and Superset ConfigMaps/Secrets to the new Postgres private IP (full-rebuild.md Step 9).
For control-plane recovery without rebuilding:
etcd-in-place.md — restore the snapshot, restart RKE2 with
--cluster-reset
Object store restore (opt-in)
Only when MinIO/S3 was backed up with groups.objectstore: true. Stages a restic restore onto the backup host (does not push into live MinIO for you):
Then copy/sync the restored tree into the live bucket (MinIO console, mc mirror, or rclone sync) during a maintenance window. Treat this like NFS restore: verify content before cutting over.
Things that are not restored automatically
Wireguard peer device-side configs — you have wg0.conf and pubkeys, but the clients'
.conffiles (with admin private keys) live on admin laptops. Re-distribute them as part of the platform recovery.Customer-supplied TLS certs — if you used
tls.method: providedin prod-config, those originals come from the customer. Backups capture the installed copies under/etc/openg2p/certs/, but the operator should also keep originals separately.Off-cluster integrations — anything outside Kubernetes (DNS records, external Postgres replicas, customer-side firewalls) needs separate restore planning.
Prometheus history / Alertmanager silence state — monitoring stack metrics are out of scope; backup alerting rules may return via rancher-backup ResourceSet, but time-series data does not.
In-cluster SMTP delivery — restoring the
mailchart does not fix outbound port-25 blocks; see Alerting.
Last updated
Was this helpful?