Snapshots

A snapshot is a copy of a Persistent Volume (PVC) at a point in time without creating a new volume. Snapshots are created by the storage backend through compatible CSI drivers and are used for fast rollback, volume cloning, and restore points before risky operations (for example, before a database upgrade).

In the Shturval platform, snapshot support is provided by the shturval-snapshotter operator (CSI Snapshotter). The operator is critical for the platform (it cannot be disabled). By default it is installed and enabled in client clusters and in the management cluster. For details, see shturval-snapshotter.

What snapshots are for

  • Restore point — before an application upgrade, database migration, or bulk data change, create a snapshot and roll back if needed.
  • Volume cloning — create a new PVC with the same data from a snapshot (without exporting data out of the storage system).
  • Short-term protection — a quick snapshot on the same storage platform without copying to external storage.

Snapshots do not replace a full backup of the cluster and data to external storage. For the differences, see What is the difference between backups and snapshots.

Kubernetes objects for snapshots

The snapshotter operator installs the following CRDs (Custom Resource Definitions):

ObjectDescription
VolumeSnapshotClassSnapshot class: attributes for creating snapshots; the main parameter is the CSI driver (the StorageClass equivalent for snapshots).
VolumeSnapshotContentThe actual snapshot contents in the storage system, bound to a VolumeSnapshot object (often created automatically).
VolumeSnapshotA namespaced Kubernetes object that requests a snapshot of a specific PVC.

Typical flow: the user creates a VolumeSnapshot, specifying the source PVC and a VolumeSnapshotClass. The snapshotter controller creates the snapshot through the CSI driver and, on success, creates or updates VolumeSnapshotContent. When the snapshot is ready, you can create a new PVC from it (restore or clone).

CSI driver support

Snapshots require a compatible CSI driver. Behavior depends on the driver: some create a snapshot without stopping the workload, others only after stopping the workload (pods must not use the PVC).

Storage typeCSI / moduleSnapshot support
Local (RawFile)shturval-local-csiYes, only after stopping the workload
CephFSshturval-ceph-csiYes, without stopping the workload
Ceph RBDshturval-ceph-csiYes, without stopping the workload
NFSshturval-nfs-csiYes
VMware vSphereshturval-capvs-csiYes1
OpenStack Cindershturval-capos-csiYes
oVirtshturval-capov-csiNo
vCloud Directorshturval-capvcd-csiNo

1 For VMware vSphere, enable the snapshotter sidecar in the CSI customvalues and grant the vCenter account permissions for volume snapshots (CNS Searchable, Datastore.FileManagement). See VMware vSphere account requirements, the vSphere tab in step 1 and step 2.

Before using snapshots, make sure snapshotter CRDs (shturval-snapshotter-crds) and the snapshotter operator (shturval-snapshotter) are enabled, along with the CSI module for your volume type. Deploy the CRDs first, then the operator. VolumeSnapshotClass must reference a driver compatible with your StorageClass.

Where to manage snapshots

  • Operator status: Services and Repositories → Installed Services → find Snapshotter operator (shturval-snapshotter) → Manage.
  • Snapshot objects (CR): select the cluster → Administration → Custom Resources. In the search field, enter snap to filter CRDs related to volume snapshots.

Custom snapshot resources in the cluster interface

The Custom Resources table shows the API group, custom resource, and number of resources in the cluster. Individual volume snapshots use the snapshot.storage.k8s.io group — VolumeSnapshot, VolumeSnapshotClass, VolumeSnapshotContent. The groupsnapshot.storage.k8s.io group contains types for group snapshots: VolumeGroupSnapshot, VolumeGroupSnapshotClass, VolumeGroupSnapshotContent. Click a resource name to open its instances and create or view objects. Sorting, API-group filters, and Clear all filters are available.

You can also apply manifests through manifest import or kubectl apply -f.

How to create, restore, and clone a volume

Commands in each step are the same for all drivers. VolumeSnapshotClass, VolumeSnapshot, and PVC manifests are on the tab for your driver.

Step 1. Check VolumeSnapshotClass

kubectl get VolumeSnapshotClass

If the class for your driver is missing, create it as shown below for each CSI provider. Upload the VolumeSnapshotClass manifest through manifest import: import icon to the left of your username → paste or upload YAML → Check → Save.

The shturval-local-csi module (driver rawfile.csi.openebs.io). Snapshot support starts with version 2.14.0.

The platform creates VolumeSnapshotClass rawfile-localpv. If the class is missing:

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: rawfile-localpv
driver: rawfile.csi.openebs.io
deletionPolicy: Delete
parameters: {}
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringrawfile-localpv
driverCSI driver. Must match the StorageClass provisionerstringrawfile.csi.openebs.io
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parametersDriver parameters. Not required for RawFileobject{}

The shturval-ceph-csi module (driver cephfs.csi.ceph.com). A VolumeSnapshotClass is not created by default. The clusterID, fsName, and secret parameters must match the StorageClass and CSI module. Secret namespace: ceph-csi-operator.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: cephfs
driver: cephfs.csi.ceph.com
deletionPolicy: Delete
parameters:
  clusterID: <clusterID>
  fsName: <filesystem-name>
  csi.storage.k8s.io/snapshotter-secret-name: <secret-name>
  csi.storage.k8s.io/snapshotter-secret-namespace: ceph-csi-operator
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringcephfs
driverCephFS CSI driver. Must match the StorageClass provisionerstringcephfs.csi.ceph.com
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parameters.clusterIDCeph cluster ID. Must match the StorageClassstringmy-cluster-id
parameters.fsNameCephFS file system namestringmyfs
parameters.csi.storage.k8s.io/snapshotter-secret-nameSecret with Ceph credentials for the snapshotterstringcsi-cephfs-secret
parameters.csi.storage.k8s.io/snapshotter-secret-namespaceSecret namespacestringceph-csi-operator

The shturval-ceph-csi module (driver rbd.csi.ceph.com). A VolumeSnapshotClass is not created by default. The clusterID, pool, and secret parameters must match the StorageClass and CSI module. Secret namespace: ceph-csi-operator.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: cephrbd
driver: rbd.csi.ceph.com
deletionPolicy: Delete
parameters:
  clusterID: <clusterID>
  pool: <pool-name>
  csi.storage.k8s.io/snapshotter-secret-name: <secret-name>
  csi.storage.k8s.io/snapshotter-secret-namespace: ceph-csi-operator
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringcephrbd
driverCeph RBD CSI driver. Must match the StorageClass provisionerstringrbd.csi.ceph.com
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parameters.clusterIDCeph cluster ID. Must match the StorageClassstringmy-cluster-id
parameters.poolCeph pool that holds the RBD imagesstringrbd
parameters.csi.storage.k8s.io/snapshotter-secret-nameSecret with Ceph credentials for the snapshotterstringcsi-ceph-secret
parameters.csi.storage.k8s.io/snapshotter-secret-namespaceSecret namespacestringceph-csi-operator

The shturval-capvs-csi module (driver csi.vsphere.vmware.com).

Enable the csi-snapshotter sidecar in the CSI controller by applying a ShturvalServicePatch to shturval-capvs-csi:

apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
  name: capvs-csi-volume-snapshots
spec:
  shturvalServiceConfigName: shturval-capvs-csi
  customvalues:
    controller:
      config:
        block-volume-snapshot: true
ParameterDescriptionTypeExample
metadata.nameShturvalServicePatch resource namestringcapvs-csi-volume-snapshots
spec.shturvalServiceConfigNameSSC name of the vSphere CSI servicestringshturval-capvs-csi
spec.customvalues.controller.config.block-volume-snapshotEnable the csi-snapshotter sidecar in the CSI controller. Without true the sidecar does not startbooleantrue

Without this parameter, the snapshotter sidecar is not present in the CSI controller pod.

Then create the VolumeSnapshotClass:

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: vspherecsi
driver: csi.vsphere.vmware.com
deletionPolicy: Delete
parameters: {}
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringvspherecsi
drivervSphere CSI driver. Must match the StorageClass provisionerstringcsi.vsphere.vmware.com
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parametersDriver parameters. Not required for vSphereobject{}

The shturval-capos-csi module (driver cinder.csi.openstack.org).

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: cinder
driver: cinder.csi.openstack.org
deletionPolicy: Delete
parameters:
  force-create: "true"
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringcinder
driverCinder CSI driver. Must match the StorageClass provisionerstringcinder.csi.openstack.org
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parameters.force-createCreate a snapshot without stopping the workload. Without "true" a snapshot of an in-use volume is not createdstring“true”

The shturval-nfs-csi module (driver nfs.csi.k8s.io).

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: nfs
driver: nfs.csi.k8s.io
deletionPolicy: Delete
parameters: {}
ParameterDescriptionTypeExample
metadata.nameVolumeSnapshotClass namestringnfs
driverNFS CSI driver. Must match the StorageClass provisionerstringnfs.csi.k8s.io
deletionPolicyDelete (Delete) or keep (Retain) snapshot contents when the VolumeSnapshot is deletedstringDelete
parametersDriver parameters. Not required for NFS CSIobject{}

Step 2. Create a VolumeSnapshot

Select the driver tab, set the source PVC, and apply the manifest:

kubectl apply -f volumesnapshot.yaml

Snapshots are created only after stopping the workload: pods must not use the PVC. Before you create the VolumeSnapshot, stop the workload:

kubectl scale statefulset <statefulset-name> -n <namespace> --replicas=0
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: rawfile-localpv
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the RawFile driverstringrawfile-localpv
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

Note: RawFile snapshots are a local physical copy on the node. For production workloads, prefer external storage (Ceph, vSphere, and others) and a full backup.

Snapshots are created without stopping the workload. Pods that use the PVC can keep running — you do not need to scale the Deployment or StatefulSet to 0 replicas.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: cephfs
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the CephFS driverstringcephfs
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

Snapshots are created without stopping the workload. Pods that use the PVC can keep running — you do not need to scale the Deployment or StatefulSet to 0 replicas.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: cephrbd
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the Ceph RBD driverstringcephrbd
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

The vCenter account used by CSI must have permissions for volume snapshots. An account that can provision PVCs may still lack VolumeSnapshot rights.

For VolumeSnapshot, the CSI user role must include:

  • CNS > Searchable (Cns.Searchable) — service role No. 2, on the vCenter root object;
  • Datastore > Low level file operations (Datastore.FileManagement) — service role No. 1, on the datastore that holds the volumes. CNS requires this privilege to create and delete block volume snapshots.

Service role No. 1 also includes Virtual machine > Snapshot management (Create / Remove / Rename / Revert snapshot). For CSI volume snapshots (FCD/CNS), the vSphere API specifies Datastore.FileManagement; the exact privilege set may depend on the vSphere version.

The full role list is in VMware vSphere account requirements.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: vspherecsi
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the vSphere driverstringvspherecsi
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

If the VolumeSnapshotClass has force-create: "true", the snapshot is created without stopping the workload: pods that use the PVC can keep running.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: cinder
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the Cinder driverstringcinder
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

Snapshots are created without stopping the workload.

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: <snapshot-name>
  namespace: <namespace>
spec:
  volumeSnapshotClassName: nfs
  source:
    persistentVolumeClaimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameSnapshot namestringapp-snap-1
metadata.namespaceNamespace of the source PVCstringapp-data
spec.volumeSnapshotClassNameVolumeSnapshotClass of the NFS driverstringnfs
spec.source.persistentVolumeClaimNamePVC to snapshotstringdata-app-0

Step 3. Wait until the snapshot is ready

kubectl get VolumeSnapshot -n <namespace>

Confirm that the READYTOUSE column is true.

You cannot restore or clone the volume until the snapshot is ready.
CSI / moduleREADYTOUSE wait notes
RawFile (shturval-local-csi)Status does not become true immediately: the snapshot is a physical copy of the data. Copy on the node: /var/csi/rawfile/<PV-name>/snapshots. When the status is true, you can start the workload again: kubectl scale statefulset <statefulset-name> -n <namespace> --replicas=1
CephFS (shturval-ceph-csi)—
Ceph RBD (shturval-ceph-csi)—
vSphere (shturval-capvs-csi)If the status stays false, check the block-volume-snapshot sidecar (step 1) and the vCenter account privileges (step 2)
OpenStack (shturval-capos-csi)If a snapshot without stopping the workload is not created, check force-create: "true" in the VolumeSnapshotClass (step 1)
NFS (shturval-nfs-csi)—

Step 4. Restore or clone the PVC

Set the snapshot in dataSource and apply the PersistentVolumeClaim manifest. The requested volume size must be at least the original size.

  • Restore the same volume (for example, a StatefulSet PVC): stop the workload, delete the original PVC, create a PVC with the same name from the snapshot, then start the workload again.

Example of restoring a StatefulSet PVC:

kubectl scale statefulset <statefulset-name> -n <namespace> --replicas=0
kubectl delete pvc -n <namespace> <pvc-name>
kubectl apply -f pvc-from-snapshot.yaml
kubectl scale statefulset <statefulset-name> -n <namespace> --replicas=1
  • Clone: create a PVC with a new name. You do not have to delete the original volume:
kubectl apply -f pvc-from-snapshot.yaml

In the PVC set StorageClass local-path. It typically uses volumeBindingMode: WaitForFirstConsumer: the PVC stays Pending until a pod mounts it.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: local-path
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original RawFile volumestringlocal-path
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteOnce
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi

In the PVC use the same StorageClass as the original volume. The default name after installing the module is csi-cephfs-sc.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: csi-cephfs-sc
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original CephFS volumestringcsi-cephfs-sc
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteMany
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi

In the PVC use the same StorageClass as the original volume. The default name after installing the module is csi-cephrbd-sc.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: csi-cephrbd-sc
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original Ceph RBD volumestringcsi-cephrbd-sc
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteOnce
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi

In the PVC set the vSphere CSI StorageClass, usually vsphere-csi.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: vsphere-csi
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original vSphere CSI volumestringvsphere-csi
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteOnce
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi

In the PVC set the Cinder StorageClass: csi-cinder-sc-delete or csi-cinder-sc-retain — the same one as the original volume.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: csi-cinder-sc-delete
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original Cinder volumestringcsi-cinder-sc-delete
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteOnce
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi

In the PVC set the NFS provisioner StorageClass. The default name is nfs-csi; if you set another name when installing the module, use that name.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <pvc-name>
  namespace: <namespace>
spec:
  storageClassName: nfs-csi
  dataSource:
    name: <snapshot-name>
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: <size>
ParameterDescriptionTypeExample
metadata.namePVC name. To restore a StatefulSet, use the same name as the original PVCstringdata-app-0
metadata.namespacePVC namespacestringapp-data
spec.storageClassNameStorageClass of the original NFS volumestringnfs-csi
spec.dataSource.nameSource VolumeSnapshot namestringapp-snap-1
spec.dataSource.kindData source kindstringVolumeSnapshot
spec.dataSource.apiGroupSnapshot API groupstringsnapshot.storage.k8s.io
spec.accessModesAccess mode. Usually matches the original PVCarrayReadWriteMany
spec.resources.requests.storageVolume size, not smaller than the originalstring100Mi
If the StorageClass uses volumeBindingMode: WaitForFirstConsumer, the new PVC may stay Pending with a waiting for first consumer event. That is expected: the PVC becomes Bound after a pod mounts it. For a clone without a workload, create a temporary pod, wait for Bound, then delete the pod.
Temporary pod to bind a PVC
apiVersion: v1
kind: Pod
metadata:
  name: pvc-init
  namespace: <namespace>
spec:
  containers:
  - name: pause
    image: r.shturval.tech/pause:3.10.1
    volumeMounts:
    - mountPath: /data
      name: data
  volumes:
  - name: data
    persistentVolumeClaim:
      claimName: <pvc-name>
ParameterDescriptionTypeExample
metadata.nameTemporary pod namestringpvc-init
metadata.namespacePVC namespacestringapp-data
spec.containers[].imagePause image from the platform registrystringr.shturval.tech/pause:3.10.1
spec.volumes[].persistentVolumeClaim.claimNamePVC to bring to Boundstringdata-app-0-clone

If you clone often, you can change volumeBindingMode on the StorageClass from WaitForFirstConsumer to Immediate.

Backing up snapshot objects

You can include VolumeSnapshot and VolumeSnapshotContent resources in a backup, but that does not copy snapshot data.

After you restore those resources, snapshots are in READYTOUSE=false. The field may later become true, but that is a new snapshot state, not the restored original snapshot data.

A PV backup also does not restore snapshot data. To keep the data, use a backup to external storage.

Limits and recommendations

  • A snapshot captures the volume at creation time. Data written after that is not in the snapshot.
  • For application-consistent data (for example, a database), stop writes or use application mechanisms (flush, freeze) before creating the snapshot. For RawFile, stopping the workload is required.
  • Snapshots consume space in the same storage system; keeping a large number of snapshots for a long time may be limited by quotas and provider policies.
  • Deleting a PVC that still has snapshots may be blocked or may require deleting the snapshots first, depending on the reclaim policy and driver.
  • VolumeSnapshotClass deletionPolicy: Delete removes snapshot contents with the object; Retain keeps the contents in the storage system.