Skip to content

Conversation

@mayankshah1607
Copy link
Member

@mayankshah1607 mayankshah1607 commented Jan 21, 2026

Due to the high volume of requests, we're unable to provide free service for this account. To continue using the service, please upgarde to a paid plan.

CHANGE DESCRIPTION

Adds support for taking backups using VolumeSnapshots API. VolumeSnapshots enable fast backups directly via the CSI driver.

This PR adds support for offline snapshot backups.

  1. Enable snapshots for your cluster
apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: cluster1
spec:
  backups:
    volumeSnapshots:
      mode: offline
      className: VOLUME-SNAPSHOT-CLASS
  1. Trigger a snapshot backup via PerconaPGBackup:
apiVersion: pgv2.percona.com/v2
kind: PerconaPGBackup
metadata:
  name: backup1
spec:
  pgCluster: cluster1
  method: volumeSnapshot

The operator will:

  • Select a healthy replica pod and temporarily suspend it.
  • Create VolumeSnapshots of its data PVC
  • Resume the suspended replica

To take scheduled snapshots:

  1. Enable snapshots for your cluster
apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: cluster1
spec:
  backups:
    volumeSnapshots:
      mode: offline
      className: VOLUME-SNAPSHOT-CLASS
      schedule: "0 0 * * 6"

Later we plan to add support for an online mode where the operator can perform a snapshot on a live primary without suspending it.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
@CLAassistant
Copy link

CLAassistant commented Jan 21, 2026

CLA assistant check
All committers have signed the CLA.

mayankshah1607 and others added 10 commits January 22, 2026 10:30
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Comment on lines +5 to +6
rm -f $PGDATA/restored-from-snapshot
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
rm -f $PGDATA/restored-from-snapshot
exit 1
rm -f $PGDATA/restored-from-snapshot
exit 1

exit 1
fi

pgbackrest --stanza=db archive-get %f "%p" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
pgbackrest --stanza=db archive-get %f "%p"
pgbackrest --stanza=db archive-get %f "%p"

@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable failure 00:00:00
custom-envs failure 00:00:00
custom-extensions failure 00:00:00
custom-tls failure 00:00:00
database-init-sql skipped 00:00:00
demand-backup skipped 00:00:00
finalizers skipped 00:00:00
init-deploy skipped 00:00:00
monitoring skipped 00:00:00
monitoring-pmm3 skipped 00:00:00
one-pod skipped 00:00:00
operator-self-healing skipped 00:00:00
pgvector-extension skipped 00:00:00
pitr skipped 00:00:00
scaling skipped 00:00:00
scheduled-backup skipped 00:00:00
self-healing skipped 00:00:00
sidecars skipped 00:00:00
start-from-backup skipped 00:00:00
tablespaces skipped 00:00:00
telemetry-transfer skipped 00:00:00
upgrade-consistency skipped 00:00:00
upgrade-minor skipped 00:00:00
users skipped 00:00:00
Summary Value
Tests Run 4/24
Job Duration 00:12:55
Total Test Time N/A

commit: bcd5d04
image: perconalab/percona-postgresql-operator:PR-1418-bcd5d049b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants