Charmed PostgreSQL K8s
- Canonical
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 20 | 20 Sep 2022 | |
14/stable | 445 | 12 Nov 2024 | |
14/stable | 444 | 12 Nov 2024 | |
14/candidate | 463 | 19 Nov 2024 | |
14/candidate | 462 | 19 Nov 2024 | |
14/beta | 463 | 19 Nov 2024 | |
14/beta | 462 | 19 Nov 2024 | |
14/edge | 465 | 20 Nov 2024 | |
14/edge | 464 | 20 Nov 2024 |
juju deploy postgresql-k8s --channel 14/edge
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Migrate database data using ‘backup/restore’
This is a guide for migrating data from modern charms. To migrate legacy charms data, refer to the guide Migrate data via pg_dump.
This Charmed PostgreSQL K8s operator is able to restore its own backups stored on S3-compatible storage. The same restore approach is applicable to restore backups made by a different installation of Charmed PostgreSQL, or even another PostgreSQL charm. (The backups have to be created manually using pgBackRest!)
Warning: The Canonical Data Team describes here the general approach and does NOT support nor guarantee the restoration results.
Always test a migration in a safe environment before performing it in production!
Prerequisites
- Check your application compatibility with Charmed PostgreSQL K8s before migrating production data from legacy charm
- Make sure PostgreSQL versions are identical before the migration
Migrate database data
Below is the general approach to the migration (see warning above!):
-
Retrieve root/admin-level credentials from the legacy charm.
See examples here.
-
Install pgBackRest inside the old charm OR nearby.
Ensure the version is compatible with pgBackRest in the new
Charmed PostgreSQL K8s
revision you are going to deploy! See examples here.Note: You can use
charmed-postgresql
SNAP/ROCK directly. More details here. -
Configure storage for database backup (local or remote, S3-based is recommended).
-
Create a first full logical backup during the off-peak
See an example of backup command here.
-
Migrate this backup to the Charmed PostgreSQL installation in your test environment.
-
Perform all the necessary tests to make sure your application accepted the new database
-
Schedule and perform the final production migration, re-using the last steps above.
Do you have questions? Contact us if you are interested in such a data migration!