Configuring backup and restore PVCs for Data Mover
Configure backup and restore persistent volume claims (PVCs) to optimize Data Mover operations. For storage classes like CephFS, these intermediate PVCs allow the system to create read-only volumes from snapshots, resulting in significantly faster backups.
You create a readonly backup PVC by using the nodeAgent.backupPVC section of the DataProtectionApplication (DPA) and setting the readOnly access mode to true.
You can use the following fields in the nodeAgent.backupPVC section of the DPA to configure the backup PVC.
-
storageClass: The name of the storage class to use for the backup PVC. -
readOnly: Indicates if the backup PVC should be mounted as read-only. Setting this field totruealso requires you to set thespcNoRelabelingfield totrue. -
spcNoRelabeling: Disables automatic relabeling of the volume if set totrue. You can set this field totrueonly whenreadOnlyistrue. When thereadOnlyflag istrue, SELinux relabeling of the volume is not possible. This causes the Data Mover backup to fail. Therefore, when you are using thereadOnlyaccess mode for the CephFS storage class, you must disable relabeling.
Configuring a backup PVC for a Data Mover backup
Configure backup persistent volume claim (PVC) settings in the DataProtectionApplication (DPA) to optimize Data Mover backup performance for different storage classes. The feature gives you read-only access modes for faster data movement.
-
You have installed the OADP Operator.
-
Configure the
nodeAgent.backupPVCsection in the DPA as shown in the following example:Example Data Protection ApplicationapiVersion: oadp.openshift.io/v1alpha1 kind: DataProtectionApplication metadata: name: ts-dpa namespace: openshift-adp spec: backupLocations: - velero: credential: key: cloud name: cloud-credentials-gcp default: true objectStorage: bucket: oadp...2jw prefix: velero provider: gcp configuration: nodeAgent: enable: true uploaderType: kopia backupPVC: storage-class-1: readOnly: true spcNoRelabeling: true storageClass: gp3-csi storage-class-2: readOnly: false spcNoRelabeling: false storageClass: gp3-csi velero: defaultPlugins: - gcp - openshift - csiwhere:
backupPVC-
Specifies the
backupPVCsection. In this example, thebackupPVCsection has configurations for two storage classes,storage-class-1andstorage-class-2. readOnly-
Specifies that the
backupPVCforstorage-class-1is configured asreadOnly. spcNoRelabeling-
Specifies that the
spcNoRelabelingfield is set totruebecause thebackupPVCforstorage-class-1isreadOnly.
-
Create a
Backupcustom resource by using the following configuration:Example BackupapiVersion: velero.io/v1 kind: Backup metadata: name: test-backup namespace: openshift-adp spec: includedNamespaces: - <application_namespace> snapshotMoveData: truesnapshotMoveData-
Set to
truefor a Data Mover backup.
-
Verify that the backup PVCs are created as read-only (
ROX) by running the following command:Example command$ oc get pvc -n openshift-adp -wtest-backup1-l..d Bound pvc-1298.....22f8 2Gi ROX standard-csi <unset> 37s test-backup1-l..d Bound pvc-1298....022f8 2Gi ROX standard-csi <unset> 37s
Configuring a restorePVC for a Data Mover restore
Configure restore persistent volume claim (PVC) settings in the DataProtectionApplication (DPA) to optimize Data Mover restore operations and enable parallel volume restores. This improves restore performance by distributing restore pods across nodes.
A restorePVC is an intermediate PVC that is used to write data during the Data Mover restore operation.
You can configure the restorePVC in the DataProtectionApplication (DPA) object by using the ignoreDelayBinding field. Setting the ignoreDelayBinding field to true allows the restore operation to ignore the WaitForFirstConsumer binding mode. The data movement restore operation then creates the restore pod and provisions the associated volume to an arbitrary node.
The ignoreDelayBinding setting is helpful in scenarios where multiple volume restores are happening in parallel. With the ignoreDelayBinding field set to true, the restore pods can be spread evenly to all nodes.
-
You have installed the OADP Operator.
-
You have a created a Data Mover backup of an application.
-
Configure the
restorePVCsection in the DPA as shown in the following example:Example Data Protection ApplicationapiVersion: oadp.openshift.io/v1alpha1 kind: DataProtectionApplication metadata: name: ts-dpa namespace: openshift-adp spec: # ... configuration: nodeAgent: enable: true uploaderType: kopia restorePVC: ignoreDelayBinding: truewhere:
restorePVC-
Specifies the
restorePVCsection. ignoreDelayBinding-
Set the
ignoreDelayBindingfield totrue.