Best practices for restoring PVCs using OADP in OpenShift

Solution Verified - Updated -

Issue

  • During a Velero restore operation on OpenShift, multiple warnings and errors appeared, indicating that certain objects, including PVC, could not be restored because they already existed in the cluster. In this case this behavior was observed specifically for a Jenkins pod with an attached PVC that was in use during the restore.
2024-XXXXXXXT18:50:02.933442947Z time="2024-XXXXXXXXXT18:50:02Z" level=info msg="Executing item action for persistentvolumeclaims" logSource="/remote-source/velero/app/pkg/restore/restore.go:1361" restore=openshift-adp/jenkins-XXXXXXXXXX
2024-XXXXXXXT18:50:02.935228981Z time="2024-XXXXXXXXXT18:50:02Z" level=info msg="Starting PVCRestoreItemAction for PVC" Action=PVCRestoreItemAction PVC=ecp-test/XXXXXXXX Restore=openshift-adp/jenkins-XXXXXXXXXXX cmd=/plugins/velero-plugin-for-csi logSource="/remote-source/app/internal/restore/pvc_action.go:132" pluginName=velero-plugin-for-csi restore=openshift-adp/jenkins-XXXXXXXXX
2024-XXXXXXXT18:50:02.956922570Z time="2024-XXXXXXXXT18:50:02Z" level=warning msg="PVC already exists. Skip restore this PVC." Action=PVCRestoreItemAction PVC=ecp-XXXXXXXX Restore=openshift-adp/jenkins-XXXXXXXX cmd=/plugins/velero-plugin-for-csi logSource="/remote-source/app/internal/restore/pvc_action.go:136" pluginName=velero-plugin-for-csi restore=openshift-adp/jenkins-XXXXXXXX
2024-XXXXXXXT18:50:02.957253625Z time="2024-XXXXXXXT18:50:02Z" level=info msg="Executing item action for persistentvolumeclaims" logSource="/remote-source/velero/app/pkg/restore/restore.go:1361" restore=openshift-adp/jenkins-XXXXXXXX
2024-XXXXXXXT18:50:02.958353464Z time="2024-XXXXXXXXT18:50:02Z" level=info msg="[pvc-restore] Returning pvc object as is since this is not a migration activity" cmd=/plugins/velero-plugins logSource="/remote-source/src/github.com/konveyor/openshift-velero-plugin/velero-plugins/pvc/restore.go:28" pluginName=velero-plugins restore=openshift-adp/jenkins-XXXXXXXX
2024-XXXXXXXXXT18:50:02.959019560Z time="2024-XXXXXXXXXT18:50:02Z" level=info msg="Resetting PersistentVolumeClaim ecp-XXXXXXXXX for dynamic provisioning" logSource="/remote-source/velero/app/pkg/restore/restore.go:1475" restore=openshift-adp/jenkins-XXXXXXXXX
2024-XXXXXXXXXT18:50:02.959082738Z time="2024-XXXXXXXXXT18:50:02Z" level=info msg="Attempting to restore PersistentVolumeClaim: jenkins" logSource="/remote-source/velero/app/pkg/restore/restore.go:1518" restore=openshift-adp/jenkins-XXXXXXXX

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • OpenShift API for Data Protection (OADP)
    • 1.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content