Backup on object stores v1
EDB Postgres Distributed for Kubernetes supports online/hot backup of PGD clusters through physical backup and WAL archiving on an object store. This means that the database is always up (no downtime required) and that point-in-time recovery (PITR) is available.
Common object stores
Multiple object stores are supported, such as AWS S3, Microsoft Azure Blob Storage, Google Cloud Storage, MinIO Gateway, or any S3-compatible provider. Given that EDB Postgres Distributed for Kubernetes configures the connection with object stores by relying on EDB Postgres for Kubernetes, see the EDB Postgres for Kubernetes common object stores for backups documentation for more information.
Important
The EDB Postgres for Kubernetes documentation's Cloud Provider configuration section is
available at spec.backup.barmanObjectStore
. In EDB Postgres Distributed for Kubernetes examples, the object store section is at a
different path: spec.backup.configuration.barmanObjectStore
.
WAL archive
WAL archiving is the process that sends WAL files to the object storage, and it's essential to execute online/hot backups or PITR. In EDB Postgres Distributed for Kubernetes, each PGD node is set up to archive WAL files in the object store independently.
The WAL archive is defined in the PGD Group spec.backup.configuration.barmanObjectStore
stanza,
and is enabled as soon as a destination path and cloud credentials are set.
You can choose to compress WAL files before they're uploaded and you can encrypt them.
You can also enable parallel WAL archiving:
For more information, see the EDB Postgres for Kubernetes WAL archiving documentation.
Scheduled backups
Scheduled backups are the recommended way to configure your backup strategy in EDB Postgres Distributed for Kubernetes.
When the PGD group spec.backup.configuration.barmanObjectStore
stanza is configured, the operator selects one of the
PGD data nodes as the elected backup node for which it creates a Scheduled Backup
resource.
The .spec.backup.cron.schedule
field allows you to define a cron schedule specification, expressed
in the Go cron
package format.
You can suspend scheduled backups if necessary by setting .spec.backup.cron.suspend
to true
. Setting this setting
to true
prevents any new backup from being scheduled.
If you want to execute a backup as soon as the ScheduledBackup
resource is created,
set .spec.backup.cron.immediate
to true
.
.spec.backupOwnerReference
indicates the ownerReference
to use
in the created backup resources. The choices are:
- none — No owner reference for created backup objects.
- self