Conversation
new file: docs/backups-pvc-snapshots.md
modified: docs/backups.md
modified: docs/env-var-operator.md
modified: docs/operator.md
There was a problem hiding this comment.
Pull request overview
Adds documentation for PVC snapshot-based backups/restores (tech preview) and exposes related configuration options in the Operator docs.
Changes:
- Adds new docs pages describing PVC snapshots and a step-by-step setup/usage tutorial.
- Updates backup/restore reference docs to include snapshot-related fields and backup method selection.
- Updates MkDocs navigation and feature-gate docs to surface the new functionality.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs-base.yml | Adds nav entries for new PVC snapshot docs (currently with a broken filename and typo). |
| docs/backups.md | Introduces “backup methods” section and links to PVC snapshots. |
| docs/backups-pvc-snapshots.md | New overview doc describing what PVC snapshots are, workflow, requirements/limitations. |
| docs/backups-pvc-setup.md | New tutorial for enabling the feature gate, configuring snapshot class, and performing backup/restore/clone flows. |
| docs/backup-resource-options.md | Documents new spec.method field for backup resources (currently inconsistent casing vs tutorial). |
| docs/restore-options.md | Adds volumeSnapshotBackupName restore option and links to the tutorial. |
| docs/operator.md | Documents dataSource.* fields and backups.volumeSnapshots.* settings. |
| docs/env-var-operator.md | Documents VolumeSnapshots=true feature gate and multi-feature configuration example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dataSource: | ||
| apiGroup: snapshot.storage.k8s.io | ||
| kind: VolumeSnapshot | ||
| name: <name-of-the-pvc-snapshot-backup> |
There was a problem hiding this comment.
The "Create a new cluster from a PVC snapshot" YAML example has inconsistent indentation and tab characters around dataSource/apiGroup/kind/name, which makes the manifest invalid when copied. Reformat the example using spaces and ensure dataSource is correctly nested under spec (as a sibling of instances).
| dataSource: | |
| apiGroup: snapshot.storage.k8s.io | |
| kind: VolumeSnapshot | |
| name: <name-of-the-pvc-snapshot-backup> | |
| dataSource: | |
| apiGroup: snapshot.storage.k8s.io | |
| kind: VolumeSnapshot | |
| name: <name-of-the-pvc-snapshot-backup> |
| Specifies what name of the PVC snapshot backup that will be used as a data source for the restore. | ||
|
|
||
| | Value type | Example | | ||
| | ---------- | ------- | | ||
| | :material-code-string: string | `my-snapshot-backup-data` | |
There was a problem hiding this comment.
dataSource.name is described as the "PVC snapshot backup" name, but dataSource.kind is VolumeSnapshot, so dataSource.name should refer to the Kubernetes VolumeSnapshot object name (not the backup resource name). Clarify this to avoid pointing users at the wrong object.
| Specifies what name of the PVC snapshot backup that will be used as a data source for the restore. | |
| | Value type | Example | | |
| | ---------- | ------- | | |
| | :material-code-string: string | `my-snapshot-backup-data` | | |
| Specifies the name of the Kubernetes `VolumeSnapshot` object that will be used as a data source for the restore. | |
| | Value type | Example | | |
| | ---------- | ------- | | |
| | :material-code-string: string | `my-volume-snapshot` | |
| Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `VolumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more. | ||
|
|
||
| | Value type | Example | | ||
| | ----------- | ---------- | | ||
| | :material-code-string: string | `VolumeSnapshot` | |
There was a problem hiding this comment.
The docs describe the spec.method supported value as VolumeSnapshot, but the new PVC snapshot tutorial uses method: volumeSnapshot and shows the backup TYPE as volumeSnapshot. Please make the casing consistent across docs to match the actual CRD enum value.
| Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `VolumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more. | |
| | Value type | Example | | |
| | ----------- | ---------- | | |
| | :material-code-string: string | `VolumeSnapshot` | | |
| Specifies what method to use for the backup. When undefined, uses `pgBackRest` by default. Supported value is `volumeSnapshot`. See [PVC snapshot support](backups-pvc-snapshots.md) to learn more. | |
| | Value type | Example | | |
| | ----------- | ---------- | | |
| | :material-code-string: string | `volumeSnapshot` | |
| - PVC shapshots: | ||
| - "About PVC snapshots": backups-pvc-snapshots.md | ||
| - "Configure PVC snapshots": backups-pvc-snapshots-setup.md |
There was a problem hiding this comment.
In the navigation, "PVC shapshots" is misspelled and the linked page backups-pvc-snapshots-setup.md does not exist in the docs tree (the new tutorial file is docs/backups-pvc-setup.md). This will produce a broken nav / build error; update the label and point the nav entry to the correct file.
| - PVC shapshots: | |
| - "About PVC snapshots": backups-pvc-snapshots.md | |
| - "Configure PVC snapshots": backups-pvc-snapshots-setup.md | |
| - PVC snapshots: | |
| - "About PVC snapshots": backups-pvc-snapshots.md | |
| - "Configure PVC snapshots": backups-pvc-setup.md |
| This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and PVC snaphots](backups-pvc-setup.md) tutorial. | ||
|
|
||
| By reading this document you will learn the following: | ||
|
|
||
| * [What is a PVC shapshot](#overview) |
There was a problem hiding this comment.
Typos in the intro/list: "snaphots"/"shapshot" should be "snapshots". Also the link text "Configure and PVC snaphots" is missing a word (e.g., "Configure and use PVC snapshots").
| This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and PVC snaphots](backups-pvc-setup.md) tutorial. | |
| By reading this document you will learn the following: | |
| * [What is a PVC shapshot](#overview) | |
| This document provides an overview of PVC snapshots. If you are familiar with the concept and want to try it out, jump to the [Configure and use PVC snapshots](backups-pvc-setup.md) tutorial. | |
| By reading this document you will learn the following: | |
| * [What is a PVC snapshot](#overview) |
| 2. Edit the `deploy/cr.yaml` Custom Resource and add the `snapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `volumeSnapshotClassName` key: | ||
|
|
||
| ```yaml | ||
| spec: | ||
| backups: | ||
| snapshots: | ||
| volumeSnapshotClassName: <name-of-your-volume-snapshot-class> |
There was a problem hiding this comment.
This section documents configuring snapshots under spec.backups.snapshots.volumeSnapshotClassName, but elsewhere in the docs (e.g., docs/operator.md) the fields are backups.volumeSnapshots.className/mode/schedule. Please align the tutorial with the actual CR schema and use consistent key names.
| 2. Edit the `deploy/cr.yaml` Custom Resource and add the `snapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `volumeSnapshotClassName` key: | |
| ```yaml | |
| spec: | |
| backups: | |
| snapshots: | |
| volumeSnapshotClassName: <name-of-your-volume-snapshot-class> | |
| 2. Edit the `deploy/cr.yaml` Custom Resource and add the `volumeSnapshots` subsection under `backups`. Specify the name of the `VolumeSnapshotClass` in the `className` key: | |
| ```yaml | |
| spec: | |
| backups: | |
| volumeSnapshots: | |
| className: <name-of-your-volume-snapshot-class> |
| 1. Configure the backup schedule in your cluster Custom Resource. Edit the `deploy/cr.yaml` manifest. In the `schedule` key in the `snapshots` subsection under `backups`, specify the schedule in the Cron format for the snapshots to be made automatically. Your updated configuration should look like this: | ||
|
|
||
| ```yaml | ||
| apiVersion: pgv2.percona.com/v2 | ||
| kind: PerconaPGCluster | ||
| metadata: | ||
| name: my-cluster | ||
| spec: | ||
| backups: | ||
| volumeSnapshots: | ||
| className: my-snapshot-class | ||
| mode: offline | ||
| schedule: "0 3 ** *" # Every day at 3:00 AM | ||
| ``` |
There was a problem hiding this comment.
The scheduled backup example has an invalid cron expression ("0 3 ** *") and the surrounding text mentions the snapshots subsection while the YAML uses volumeSnapshots. Fix the cron to a valid 5-field expression and make the subsection name consistent.
| Following feature gates are present as of Operator version 2.8.1: | ||
|
|
||
| 1. `AutoGrowVolumes=true` - Enables automatic PVC resize when the storage usage reaches a threshold. The Operator can trigger volume expansion for database data volumes. To learn more, refer to the [Scale your cluster](scaling.md#enable-automatic-storage-resize) chapter. | ||
|
|
||
| 2. `VolumeSnapshots=true` - Enables [PVC snapshot support](backups-pvc-snapshots.md) for backups and restores. When enabled and configured in the cluster Custom Resource, the Operator creates volume snapshots in coordination with pgBackRest backups, enabling much faster restores for large datasets. |
There was a problem hiding this comment.
This section says feature gates are present "as of Operator version 2.8.1", but VolumeSnapshots is described elsewhere in the docs as starting with 2.9.0. Please reconcile the version statement so users don't assume the feature gate exists in 2.8.1.
| or | ||
|
|
||
| ```bash | ||
| kubectl apply --sever-side -f deploy/bundle.yaml -n $NAMESPACE |
There was a problem hiding this comment.
Typo in the kubectl command: --sever-side should be --server-side. As written, the command will fail when copied.
| kubectl apply --sever-side -f deploy/bundle.yaml -n $NAMESPACE | |
| kubectl apply --server-side -f deploy/bundle.yaml -n $NAMESPACE |
| apiVersion: snapshot.storage.k8s.io/v1 | ||
| kind: VolumeSnapshotClass | ||
| metadata: | ||
| name: gke-snapshot-class |
There was a problem hiding this comment.
The VolumeSnapshotClass YAML example uses a tab-indented name: field under metadata:. Tabs make the YAML invalid for copy/paste; use spaces and align name correctly under metadata:.
| name: gke-snapshot-class | |
| name: gke-snapshot-class |
new file: docs/backups-pvc-snapshots.md
modified: docs/backups.md
modified: docs/env-var-operator.md
modified: docs/operator.md