1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/oadp-backingup-persistent-volumes.adoc
Shruti Deshpande 9a10473640 Modularization work for backing-up title
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
2025-07-03 14:43:05 +00:00

38 lines
1.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/backing_up_and_restoring/oadp-backing-up-pvs-csi-doc.adoc
:_mod-docs-content-type: PROCEDURE
[id="backingup-persistent-volumes_{context}"]
= Backing up persistent volumes with CSI snapshots
.Prerequisites
* The cloud provider must support CSI snapshots.
* You must enable CSI in the `DataProtectionApplication` CR.
.Procedure
* Add the `metadata.labels.velero.io/csi-volumesnapshot-class: "true"` key-value pair to the `VolumeSnapshotClass` CR:
+
.Example configuration file
[source,yaml,subs="attributes+"]
----
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: <volume_snapshot_class_name>
labels:
velero.io/csi-volumesnapshot-class: "true" <1>
annotations:
snapshot.storage.kubernetes.io/is-default-class: true <2>
driver: <csi_driver>
deletionPolicy: <deletion_policy_type> <3>
----
<1> Must be set to `true`.
<2> If you are restoring this volume in another cluster with the same driver, make sure that you set the `snapshot.storage.kubernetes.io/is-default-class` parameter to `false` instead of setting it to `true`. Otherwise, the restore will partially fail.
<3> OADP supports the `Retain` and `Delete` deletion policy types for CSI and Data Mover backup and restore.
.Next steps
* You can now create a `Backup` CR.