Excluding external volumes from Cloud Pak for Data offline backups

You can exclude external Persistent Volume Claims (PVCs) in the Cloud Pak for Data instance project from offline backups that are created with the Cloud Pak for Data OpenShift® APIs for Data Protection (OADP) backup and restore utility.

About this task

You might want to exclude PVCs that were manually created in the Cloud Pak for Data project (namespace) but are not needed by Cloud Pak for Data services. These volumes might be too large for a backup, or they might already be backed up by other means.

Note: During restore, you might need to manually create excluded PVCs if pods fail to start because of an excluded PVC.

Procedure

  1. For backups that are created by using Container Storage Interface (CSI) snapshots, label the PVC to exclude with the Velero exclude label:
    oc label pvc <pvc-name> velero.io/exclude-from-backup=true
  2. For backups that are created by using Restic, exclude both the PVC and any pods that mount the PVC.
    1. Label the PVC to exclude with the Velero exclude label:
      oc label pvc <pvc-name> velero.io/exclude-from-backup=true
    2. Label any pods that mount the PVC with the Velero exclude label.

      In the PVC describe output, look for pods in Mounted By. For each pod, add the label:

      oc describe pvc <pvc-name>
      oc label po <pod-name> velero.io/exclude-from-backup=true