BACKUPS
Production backups
Do not apply a ScheduledBackup until the Cluster can actually write one.
Preferred (CNPG 1.26+): Barman Cloud plugin¶
- Install the Barman Cloud CNPG-I plugin.
- Create an
ObjectStorepointing at your bucket. - Add the plugin to
Cluster.spec.plugins. - Apply a ScheduledBackup with
method: plugin.
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: platform-db-nightly
namespace: identity
spec:
schedule: "0 0 2 * * *"
backupOwnerReference: self
cluster:
name: platform-db
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
Volume snapshots¶
If the StorageClass has a CSI snapshotter:
spec:
method: volumeSnapshot
./cli/haven backup platform --now uses this method so a misconfigured object store does not fail the request silently.