Skip to content

configure hot backups using CNPG #7

@mbjones

Description

@mbjones

CloudNativePG now supports both hot and cold backups. For hot backups, it supports both a CNGP-I plugin to use external backup systems like Barman to backup to an object store, or CSI Volume snapshots. For this initial use case, it is simplest to focus on volume snapshots for the backup and WAL files. By default, the backup uses online hot snapshots, which should work great for us. Once a backup has been completed, we will need to work with Nick to be sure it is preserved.

Because backups can be intensive, we can request that backups be made against a replica service rather than the primary, which reduces load on the rw service.

Configuration involves providing an instance of the ScheduledBackup resource. A typical configuration might look like this:

apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
  name: keycloak-pg-backup
spec:
  schedule: "0 0 0 * * *"  # At midnight every day
  backupOwnerReference: self
  cluster:
    name: keycloak-pg
  method: volumeSnapshot

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions