Charmed PostgreSQL

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
14/stable 336 18 Oct 2023
Ubuntu 22.04
14/candidate 336 18 Oct 2023
Ubuntu 22.04
14/beta 336 18 Oct 2023
Ubuntu 22.04
14/edge 350 Today
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information



DB data migration using ‘backup/restore’

:information_source: Tip: use ‘pg_dump’ manual to migrate legacy charms data.

This Charmed PostgreSQL operator is able to restore it’s own backups stored on S3-compatible storage. The same restore approach is applicable to restore foreign backups made by different Charmed PostgreSQL installation or even another PostgreSQL charms. The backup have to be created manually using pgBackRest!

Canonical Data team describes here the general approach and does NOT support nor guaranties the restoration results. Always test migration in LAB before performing it in Production!

Please check your application compatibility with Charmed PostgreSQL before migrating production data from legacy charm! Make sure PostgreSQL versions are identical before the migration!

The approach:

  • retrieve root/admin level credentials from legacy charm. See examples here.
  • install pgBackRest inside the old charm OR nearby. Ensure the version is compatible with pgBackRest in a new Charmed PostgreSQL revision you are going to deploy! See examples. BTW, 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, example of backup command.
  • restore the foreign backup to Charmed PostgreSQL Lab installation.
  • perform all the necessary tests to make sure your application accepted new DB.
  • 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!