Closed ShellyXueHan closed 4 years ago
@caggles, @ShellyXueHan , Some general thoughts on resizing or migrating PVCs, and backup (dump)/restore.
We have some automated tools to help with migrating data from one PVC to another of a different size and/or class that leaves the DCs unchanged in the end; BCDevOps/StorageMigration - MigrationSteps. I've used these tools to migrate data to larger PVCs and PVCs of different classes, for PostgreSQL and Jenkins containers. This should cover nearly all of your PVC resizing or migration needs.
For backup/restore of PostgreSQL (if that is really what is needed) I'd recommend using the BCDevOps/backup-container. At it's core (the PostgreSQL version) is a PostgreSQL v10 container, but the backup scripts provide you tested easy to use backup and restore functionality rather than fiddling with the raw pg_dump
and psql
backup/restore features directly.
Background:
Fix:
Bring up another postgres v10 pod, copy over the data folder and spin up the db there. Then do pg_dump to obtain a proper copy.
Notes for next steps:
postgresql-documize-patroni-prod-2
contains the original copy of db, only remove when patroni is fully up and running with 2 replicas.documize-patroni-prod
is brand new without any data, running only one replica (which is the master pod)documize-patroni-prod
in prod namespace for db connections.