Skip to content

Making on-demand backups

To make an on-demand backup manually, you need a backup configuration file. You can use the example of the backup configuration file deploy/backup.yaml :

apiVersion: pgv2.percona.com/v2
kind: PerconaPGBackup
metadata:
  name: backup1
spec:
  pgCluster: cluster1
  repoName: repo1
#  options:
#  - --type=full

Here’s a sequence of steps to follow:

  1. Before you start, make sure you have configured a backup storage.
  2. In the deploy/backup.yaml configuration file, specify the cluster name and the repository name to be used for backups. The repository name must be the same as the one you defined in the backup storage configuration. It must also match the repository name specified in the backups.pgbackrest.manual subsection of the deploy/cr.yaml file.
  3. If needed, you can add any pgBackRest command line options .

  4. Make a backup with the following command:

    $ kubectl apply -f deploy/backup.yaml
    

Tip

To list the backup, run:

$ kubectl get pg-backup

Next steps

Restore from a backup

Backup retention

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.


Last update: 2024-06-13