Charmed PostgreSQL K8s

Channel Revision Published Runs on
latest/stable 20 20 Sep 2022
Ubuntu 20.04
14/stable 280 28 Jun 2024
Ubuntu 22.04
14/stable 281 28 Jun 2024
Ubuntu 22.04
14/candidate 281 18 Jun 2024
Ubuntu 22.04
14/candidate 280 18 Jun 2024
Ubuntu 22.04
14/beta 281 18 Jun 2024
Ubuntu 22.04
14/beta 280 18 Jun 2024
Ubuntu 22.04
14/edge 315 Yesterday
Ubuntu 22.04
14/edge 314 Yesterday
Ubuntu 22.04
juju deploy postgresql-k8s --channel 14/stable
Show information

Platform:

Note: All commands are written for juju >= v.3.0

If you are using an earlier version, check the Juju 3.0 Release Notes.

How to create and list backups

This guide contains recommended steps and useful commands for creating and managing backups to ensure smooth restores.

Prerequisites


Create a backup

Once you have a three-node cluster with configurations set for S3 storage, check that Charmed PostgreSQL is active and idle with juju status.

Once Charmed PostgreSQL is active and idle, you can create your first backup with the create-backup command:

juju run postgresql-k8s/leader create-backup

By default, backups created with command above will be full backups: a copy of all your data will be stored in S3. There are 2 other supported types of backups (available in revision 263+, currently in channel 14/edge only):

  • Differential: Only modified files since the last full backup will be stored.
  • Incremental: Only modified files since the last successful backup (of any type) will be stored.

To specify the desired backup type, use the type parameter:

juju run postgresql-k8s/leader create-backup type={full|differential|incremental}

Tip: To avoid unnecessary service downtime, always use non-primary units for the action create-backup. Keep in mind that:

  • TLS enabled: disables the command from running on primary units.
  • TLS not enabled: disables the command from running on non-primary units.

List backups

You can list your available, failed, and in-progress backups by running the list-backups command:

juju run postgresql-k8s/leader list-backups