Skip to content

Make scheduled backups

Backups schedule is defined on the per-repository basis in the backups.pgbackrest.repos subsection of the deploy/cr.yaml file.

You can supply each repository with a schedules.<backup type> key equal to an actual schedule that you specify in crontab format.

  1. Before you start, make sure you have configured a backup storage.

  2. Configure backup schedule in the deploy/cr.yaml file. The schedule is specified in crontab format as explained in Custom Resource options. The repository name must be the same as the one you defined in the backup storage configuration. The following example shows the schedule for repo1 repository:

...
backups:
  pgbackrest:
  ...
        repos:
        - name: repo1
          schedules:
            full: "0 0 * * 6"
            differential: "0 1 * * 1-6"
          ...
  1. Update the cluster:

    $ kubectl apply -f deploy/cr.yaml
    

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-11-13