Configure storage for backups¶
Configure storage for backups in the backup.storages subsection of the Custom Resource, using the deploy/cr.yaml configuration file.
For a cloud backup storage such as Amazon S3, S3-compatible or Azure Blob storage, create a Kubernetes Secret with the access credentials before you configure backup.storages. Persistent Volume storage does not use a Secret.
The Operator supports the following storage types:
| Storage type | When to use | Configuration |
|---|---|---|
| Amazon S3 or S3-compatible storage (including Google Cloud Storage) | Keep backups outside the Kubernetes cluster. For example, to restore them to another cluster or environment. | Configure Amazon S3 or S3-compatible storage |
| Microsoft Azure Blob storage | Keep backups outside the Kubernetes cluster. For example, to restore them to another cluster or environment. | Configure Microsoft Azure Blob storage |
| Persistent Volume | Keep backups in the same Kubernetes cluster and if you don’t need to move them elsewhere. | Configure Persistent Volume storage |
Extra options for XtraBackup¶
The configuration guides in the table are enough for Percona XtraBackup to make backups and restores. When your storage needs additional settings, pass them to the XtraBackup tools via the following options in the Custom Resource:
- backup.storages.STORAGE_NAME.containerOptions.args.xtrabackup for the
xtrabackupcommand - backup.storages.STORAGE_NAME.containerOptions.args.xbcloud for the
xbcloudcommand - backup.storages.STORAGE_NAME.containerOptions.args.xbstream for the
xbstreamcommand
To set environment variables for the XtraBackup container, use backup.storages.STORAGE_NAME.containerOptions.env.
Next step¶
On-demand backup Scheduled backup
Created: July 4, 2023