Charmed PostgreSQL VM

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 239 09 Feb 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 226 01 Apr 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
14/stable 468 11 Sep 2024
Ubuntu 22.04
14/stable 467 11 Sep 2024
Ubuntu 22.04
14/candidate 468 02 Sep 2024
Ubuntu 22.04
14/candidate 467 02 Sep 2024
Ubuntu 22.04
14/beta 516 19 Nov 2024
Ubuntu 22.04
14/beta 515 19 Nov 2024
Ubuntu 22.04
14/edge 518 19 Nov 2024
Ubuntu 22.04
14/edge 517 19 Nov 2024
Ubuntu 22.04
juju deploy postgresql --channel 14/candidate
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04 14.04

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

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

Manage backup retention

Charmed PostgreSQL backups can be managed via a retention policy. This retention can be set by the user in the form of a configuration parameter in the charm s3-integrator via the config option experimental-delete-older-than-days.

This guide will teach you how to set this configuration and how it works in managing existing backups.

Note: This is an EXPERIMENTAL parameter, use it with caution.

Configure S3-integrator charm

If not done already, deploy and run the charm:

juju deploy s3-integrator
juju run s3-integrator/leader sync-s3-credentials access-key=<access-key-here> secret-key=<secret-key-here>

Then, use juju config to add the desired retention time in days:

juju config s3-integrator experimental-delete-older-than-days=<number-of-days>

To pass these configurations to a Charmed PostgreSQL application, integrate the two applications:

juju integrate s3-integrator postgresql

If at any moment it is desired to remove this option, the user can erase this configuration from the charm:

juju config s3-integrator --reset experimental-delete-older-than-days

Note: This configuration will be enforced in every Charmed PostgreSQL application related to the configured S3-integrator charm

Note: The retention is not enforced automatically once a backup is older than the set amount of days: Backups older than the set retention time will only get expired only once a newer backup is created.

This behavior avoids complete backup deletion if there has been no newer backups created in the charm.

The s3-integrator charm accepts many configurations - enter whichever are necessary for your S3 storage.


Help improve this document in the forum (guidelines). Last updated 5 months ago.