---
# System prepended metadata

title: kubevirt-velero-plugin - selective PV and VS restore testing

---

# kubevirt-velero-plugin - selective PV and VS restore testing


Manual Testing:

OpenShift with KubeVirt and 4 VMs:

```shell
# Two VMs in mpryc-vm NS:

$ oc get vm -n mpryc-vm
NAME                                      AGE     STATUS    READY
mpryc-my-test-vm                          6d18h   Running   True
mpryc-sec-vm-in-same-ns                   6d3h    Running   True
mpryc-third-vm-one-pvcs-plus-shared-pvc   16s     Running   True
mpryc-third-vm-two-pvcs                   5m56s   Running   True

# 1. Each VM has own dedicated PVCs
#
# 2. The following 2 VMs have additional shared among them PVC:
#    Shared PV name: mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17
#      - mpryc-third-vm-one-pvcs-plus-shared-pvc
#      - mpryc-third-vm-two-pvcs

$ oc get pvc -n mpryc-vm
NAME                                             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
mpryc-my-test-vm                                 Bound    pvc-3a2776ef-2865-4959-bd90-fb96915c6429   3Gi        RWX            ocs-storagecluster-ceph-rbd   6d18h
mpryc-sec-vm-in-same-ns                          Bound    pvc-33cd7007-97f1-4317-b93d-3cca5d425452   30Gi       RWX            ocs-storagecluster-ceph-rbd   6d4h
mpryc-third-vm-one-pvcs-plus-shared-pvc          Bound    pvc-973a4461-d6db-4534-92f6-b709f716cdb1   30Gi       RWX            ocs-storagecluster-ceph-rbd   45m
mpryc-third-vm-two-pvcs                          Bound    pvc-4e4b0630-7ec1-4893-976a-f6df4f437e04   30Gi       RWX            ocs-storagecluster-ceph-rbd   49m
mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17   Bound    pvc-7041f1cb-4e0e-4bd1-be4a-c8d48e3949e7   5Gi        RWX            ocs-storagecluster-ceph-rbd   49m
```

1. Creating backup

```shell
$ cat ./vm-backup.yaml
kind: Backup
apiVersion: velero.io/v1
metadata:
  name: mpryc-vm-backup-modified-kubevirt-plugin
  namespace: openshift-adp
spec:
  csiSnapshotTimeout: 10m0s
  defaultVolumesToFsBackup: false
  includedNamespaces:
    - mpryc-vm
  itemOperationTimeout: 4h0m0s
  snapshotMoveData: false
  storageLocation: ts-dpa-1
  ttl: 720h0m0s


$ oc apply -f ./vm-backup.yaml
backup.velero.io/mpryc-vm-backup-modified-kubevirt-plugin

$ velero backup get mpryc-vm-backup-modified-kubevirt-plugin
NAME                                       STATUS      ERRORS   WARNINGS   CREATED                          EXPIRES   STORAGE LOCATION   SELECTOR
mpryc-vm-backup-modified-kubevirt-plugin   Completed   0        0          2025-09-24 14:56:16 +0200 CEST   29d       ts-dpa-1           <none>
```

# Details from the backup

```shell
$ velero backup describe mpryc-vm-backup-modified-kubevirt-plugin

# [...] output truncated

Resource List:
  snapshot.storage.k8s.io/v1/VolumeSnapshotContent:
    - snapcontent-2255e01c-da18-4d50-b0aa-60f03cbfd0c1
    - snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
    - snapcontent-8c127646-c6ba-4f1f-be30-5d8fa106437d
    - snapcontent-c351e614-04bc-41de-933d-e848e385f029
    - snapcontent-ea2a4110-86fa-4b68-8b56-57967b58a90d
    - snapcontent-fa4ee301-0219-4947-9b36-cb742a5411cb
  v1/PersistentVolume:
    - pvc-33cd7007-97f1-4317-b93d-3cca5d425452
    - pvc-3a2776ef-2865-4959-bd90-fb96915c6429
    - pvc-4e4b0630-7ec1-4893-976a-f6df4f437e04
    - pvc-7041f1cb-4e0e-4bd1-be4a-c8d48e3949e7
    - pvc-973a4461-d6db-4534-92f6-b709f716cdb1
  v1/PersistentVolumeClaim:
    - mpryc-vm/mpryc-my-test-vm
    - mpryc-vm/mpryc-sec-vm-in-same-ns
    - mpryc-vm/mpryc-third-vm-one-pvcs-plus-shared-pvc
    - mpryc-vm/mpryc-third-vm-two-pvcs
    - mpryc-vm/mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17

Backup Volumes:
  CSI Snapshots:
    mpryc-vm/mpryc-my-test-vm:
      Snapshot:
        Operation ID: mpryc-vm/velero-mpryc-my-test-vm-pmtm9/2025-09-24T12:56:23Z
        Snapshot Content Name: snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
        Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
        Snapshot Size (bytes): 3221225472
        CSI Driver: openshift-storage.rbd.csi.ceph.com
        Result: 
    mpryc-vm/mpryc-sec-vm-in-same-ns:
      Snapshot:
        Operation ID: mpryc-vm/velero-mpryc-sec-vm-in-same-ns-r75kj/2025-09-24T12:56:28Z
        Snapshot Content Name: snapcontent-fa4ee301-0219-4947-9b36-cb742a5411cb
        Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-e8766c1c-c25a-431a-80dd-79fc6e284729
        Snapshot Size (bytes): 32212254720
        CSI Driver: openshift-storage.rbd.csi.ceph.com
        Result: 
    mpryc-vm/mpryc-third-vm-one-pvcs-plus-shared-pvc:
      Snapshot:
        Operation ID: mpryc-vm/velero-mpryc-third-vm-one-pvcs-plus-shared-pvc-ghjdw/2025-09-24T12:56:33Z
        Snapshot Content Name: snapcontent-2255e01c-da18-4d50-b0aa-60f03cbfd0c1
        Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-32e9e473-2311-4ea3-99ec-ae782cc2c06a
        Snapshot Size (bytes): 32212254720
        CSI Driver: openshift-storage.rbd.csi.ceph.com
        Result: 
    mpryc-vm/mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17:
      Snapshot:
        Operation ID: mpryc-vm/velero-mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17-fj6sl/2025-09-24T12:56:39Z
        Snapshot Content Name: snapcontent-8c127646-c6ba-4f1f-be30-5d8fa106437d
        Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-e29a7130-0b1b-4c7a-80bc-50a6f936d404
        Snapshot Size (bytes): 5368709120
        CSI Driver: openshift-storage.rbd.csi.ceph.com
        Result: 
    mpryc-vm/mpryc-third-vm-two-pvcs:
      Snapshot:
        Operation ID: mpryc-vm/velero-mpryc-third-vm-two-pvcs-j62mk/2025-09-24T12:56:44Z
        Snapshot Content Name: snapcontent-c351e614-04bc-41de-933d-e848e385f029
        Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-8010658a-8e87-4964-b279-1c5264af42f0
        Snapshot Size (bytes): 32212254720
        CSI Driver: openshift-storage.rbd.csi.ceph.com
        Result: 
```

2. Downloading metadata from backup and confirming new annotations
```shell

$ velero backup download mpryc-vm-backup-modified-kubevirt-plugin
Backup mpryc-vm-backup-modified-kubevirt-plugin has been successfully downloaded to /home/migi/Development/Upstream/OADP/mpryc-kubevirt-velero-plugin/mpryc-vm-backup-modified-kubevirt-plugin-data.tar.gz

$ tar -xvf mpryc-vm-backup-modified-kubevirt-plugin-data.tar.gz

# Confirm the labels are applied:
$ grep -r --include='*.json' -H -o '"velero\.kubevirt\.io/\(pvc-uid\|original-pvc-uid\|original-volumesnapshot-uid\)"[[:space:]]*:[[:space:]]*"[^"]*"' resources/   | grep -v 'v1-preferredversion'   | sed -E 's|(.*):"([^"]+)": *"([^"]+)"|\1 \n  LABEL:     \2=\3|'
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/velero-mpryc-my-test-vm-pmtm9.json 
  LABEL:     velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/velero-mpryc-sec-vm-in-same-ns-r75kj.json 
  LABEL:     velero.kubevirt.io/pvc-uid=c7f96f1f-0051-44d7-aa12-84085e53376b
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/velero-mpryc-third-vm-one-pvcs-plus-shared-pvc-ghjdw.json 
  LABEL:     velero.kubevirt.io/pvc-uid=8c52a10e-dd6b-430b-b6a3-55d1082f0d20
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/velero-mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17-fj6sl.json 
  LABEL:     velero.kubevirt.io/pvc-uid=3daa61e0-e723-4667-a5ab-fdc8e72aa4e7
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/velero-mpryc-third-vm-two-pvcs-j62mk.json 
  LABEL:     velero.kubevirt.io/pvc-uid=eda88c6d-6752-4b0a-99a2-fd4da234a451
resources/volumesnapshots.snapshot.storage.k8s.io/namespaces/mpryc-vm/my-vs.json 
  LABEL:     velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5
resources/persistentvolumeclaims/namespaces/mpryc-vm/mpryc-my-test-vm.json 
  LABEL:     velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5
resources/persistentvolumeclaims/namespaces/mpryc-vm/mpryc-sec-vm-in-same-ns.json 
  LABEL:     velero.kubevirt.io/pvc-uid=c7f96f1f-0051-44d7-aa12-84085e53376b
resources/persistentvolumeclaims/namespaces/mpryc-vm/mpryc-third-vm-one-pvcs-plus-shared-pvc.json 
  LABEL:     velero.kubevirt.io/pvc-uid=8c52a10e-dd6b-430b-b6a3-55d1082f0d20
resources/persistentvolumeclaims/namespaces/mpryc-vm/mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17.json 
  LABEL:     velero.kubevirt.io/pvc-uid=3daa61e0-e723-4667-a5ab-fdc8e72aa4e7
resources/persistentvolumeclaims/namespaces/mpryc-vm/mpryc-third-vm-two-pvcs.json 
  LABEL:     velero.kubevirt.io/pvc-uid=eda88c6d-6752-4b0a-99a2-fd4da234a451
```

3. Create 3 namespaces to test restore operation:

```shell
$ oc create ns mpryc-vm-restore-modified-kubevirt-plugin-data-v1
namespace/mpryc-vm-restore-modified-kubevirt-plugin-data-v1 created
$ oc create ns mpryc-vm-restore-modified-kubevirt-plugin-data-v2
namespace/mpryc-vm-restore-modified-kubevirt-plugin-data-v2 created
$ oc create ns mpryc-vm-restore-modified-kubevirt-plugin-data-v3
namespace/mpryc-vm-restore-modified-kubevirt-plugin-data-v3 created
```

4. Test restore operation:

4a. Restore one PVC from non shared PV only to a v1 ns

```shell
$ velero restore create   \
    --from-backup mpryc-vm-backup-modified-kubevirt-plugin \
    --include-resources persistentvolumeclaims,volumesnapshots  \
    --namespace-mappings mpryc-vm:mpryc-vm-restore-modified-kubevirt-plugin-data-v1 \
    --selector velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5
Restore request "mpryc-vm-backup-modified-kubevirt-plugin-20250924151420" submitted successfully.
Run `velero restore describe mpryc-vm-backup-modified-kubevirt-plugin-20250924151420` or `velero restore logs mpryc-vm-backup-modified-kubevirt-plugin-20250924151420` for more details.

$ velero restore describe mpryc-vm-backup-modified-kubevirt-plugin-20250924151420    

# [...] output truncated

CSI Snapshot Restores:
  mpryc-vm-restore-modified-kubevirt-plugin-data-v1/mpryc-my-test-vm:
    Snapshot:
      Snapshot Content Name: velero-mpryc-my-test-vm-pmtm9-hzs8m
      Storage Snapshot ID: 0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
      CSI Driver: openshift-storage.rbd.csi.ceph.com

$ oc get pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v1
NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
mpryc-my-test-vm   Bound    pvc-b6672719-5110-4bbd-8639-1d47dbdb13b3   3Gi        RWX            ocs-storagecluster-ceph-rbd   81s

$ oc describe  pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v1 mpryc-my-test-vm

# [...] output truncated - labels on the pvc prior to backup exists, no new uid labels added

Labels:        app=containerized-data-importer
               app.kubernetes.io/component=storage
               app.kubernetes.io/managed-by=cdi-controller
               app.kubernetes.io/part-of=hyperconverged-cluster
               app.kubernetes.io/version=4.15.12
               kubevirt.io/created-by=ef0dc743-af73-4ab5-acc4-011a4bd6ef6d
               ownlabel/preserveme=123456
               velero.io/backup-name=mpryc-vm-backup-modified-kubevirt-plugin
               velero.io/restore-name=mpryc-vm-backup-modified-kubevirt-plugin-20250924151420
               velero.io/volume-snapshot-name=velero-mpryc-my-test-vm-pmtm9

DataSource:
  APIGroup:  snapshot.storage.k8s.io
  Kind:      VolumeSnapshot
  Name:      velero-mpryc-my-test-vm-pmtm9

$ oc describe vs velero-mpryc-my-test-vm-pmtm9 -n mpryc-vm-restore-modified-kubevirt-plugin-data-v1

# [...] output truncated - labels on the pvc prior to backup exists, no new uid labels added

Name:         velero-mpryc-my-test-vm-pmtm9
Namespace:    mpryc-vm-restore-modified-kubevirt-plugin-data-v1
Labels:       app=containerized-data-importer
              app.kubernetes.io/component=storage
              app.kubernetes.io/managed-by=cdi-controller
              app.kubernetes.io/part-of=hyperconverged-cluster
              app.kubernetes.io/version=4.15.12
              kubevirt.io/created-by=ef0dc743-af73-4ab5-acc4-011a4bd6ef6d
              ownlabel/preserveme=123456
              velero.io/backup-name=mpryc-vm-backup-modified-kubevirt-plugin
              velero.io/restore-name=mpryc-vm-backup-modified-kubevirt-plugin-20250924151420
Annotations:  velero.io/csi-driver-name: openshift-storage.rbd.csi.ceph.com
              velero.io/csi-volumesnapshot-handle: 0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
              velero.io/csi-volumesnapshot-restore-size: 3Gi
              velero.io/csi-vsc-deletion-policy: Retain


# Confirm the backup snapshot handle is same as volume snapshot for restore:

$ cat resources/volumesnapshots.snapshot.storage.k8s.io/v1-preferredversion/namespaces/mpryc-vm/velero-mpryc-my-test-vm-pmtm9.json|jq

# [...] output truncated - labels on the pvc prior to backup exists, no new uid labels added

  "status": {
    "boundVolumeSnapshotContentName": "snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a",
    "creationTime": "2025-09-24T12:56:18Z",
    "readyToUse": true,
    "restoreSize": "3Gi"
  }


$ oc describe vsc snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
Name:         snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
Namespace:    
Labels:       velero.io/backup-name=mpryc-vm-backup-modified-kubevirt-plugin
Annotations:  snapshot.storage.kubernetes.io/deletion-secret-name: rook-csi-rbd-provisioner
              snapshot.storage.kubernetes.io/deletion-secret-namespace: openshift-storage
              snapshot.storage.kubernetes.io/volumesnapshot-being-deleted: yes
API Version:  snapshot.storage.k8s.io/v1
Kind:         VolumeSnapshotContent
Metadata:
  Creation Timestamp:  2025-09-24T12:56:18Z
  Finalizers:
    snapshot.storage.kubernetes.io/volumesnapshotcontent-bound-protection
  Generation:        1
  Resource Version:  17574703
  UID:               0d040d63-442a-4c6c-b133-4f4e2d880dbd
Spec:
  Deletion Policy:  Retain
  Driver:           openshift-storage.rbd.csi.ceph.com
  Source:
    Volume Handle:             0001-0011-openshift-storage-0000000000000002-15c9d73d-f63a-4601-a7ff-9ee141189703
  Volume Snapshot Class Name:  example-snapclass
  Volume Snapshot Ref:
    API Version:       snapshot.storage.k8s.io/v1
    Kind:              VolumeSnapshot
    Name:              velero-mpryc-my-test-vm-pmtm9
    Namespace:         mpryc-vm
    Resource Version:  17574243
    UID:               3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
Status:
  Creation Time:    1758718578822583118
  Ready To Use:     true
  Restore Size:     3221225472
  Snapshot Handle:  0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
Events:             <none>


$ oc describe vsc velero-mpryc-my-test-vm-pmtm9-hzs8m
Name:         velero-mpryc-my-test-vm-pmtm9-hzs8m
Namespace:    
Labels:       velero.io/restore-name=mpryc-vm-backup-modified-kubevirt-plugin-20250924151420
Annotations:  <none>
API Version:  snapshot.storage.k8s.io/v1
Kind:         VolumeSnapshotContent
Metadata:
  Creation Timestamp:  2025-09-24T13:14:22Z
  Finalizers:
    snapshot.storage.kubernetes.io/volumesnapshotcontent-bound-protection
  Generate Name:     velero-mpryc-my-test-vm-pmtm9-
  Generation:        2
  Resource Version:  17589713
  UID:               89b0e5d4-0055-40ce-8f8d-5b35f029036e
Spec:
  Deletion Policy:  Retain
  Driver:           openshift-storage.rbd.csi.ceph.com
  Source:
    Snapshot Handle:           0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
  Volume Snapshot Class Name:  example-snapclass
  Volume Snapshot Ref:
    API Version:  snapshot.storage.k8s.io/v1
    Kind:         VolumeSnapshot
    Name:         velero-mpryc-my-test-vm-pmtm9
    Namespace:    mpryc-vm-restore-modified-kubevirt-plugin-data-v1
    UID:          33f6b62f-7634-48c7-b0a9-f56857b712c6
Status:
  Creation Time:    1758719662091485929
  Ready To Use:     true
  Restore Size:     0
  Snapshot Handle:  0001-0011-openshift-storage-0000000000000002-5a700a05-5837-46ba-ac04-2e51df56fb3e
Events:             <none>
```

# Summary
```shell
# Backup: VolumeSnapshotContent created
VSC: snapcontent-3450dfd1-e4f8-4ff2-8d7a-8374f0a4788a
SnapshotHandle: 0001-0011-openshift-storage-...-5a700a05-5837-46ba-ac04-2e51df56fb3e

   |
   v

# Restore: new VolumeSnapshotContent created
VSC: velero-mpryc-my-test-vm-pmtm9-hzs8m
SnapshotHandle: 0001-0011-openshift-storage-...-5a700a05-5837-46ba-ac04-2e51df56fb3e   <-- SAME

   |
   v

# Restored VolumeSnapshot
Name: velero-mpryc-my-test-vm-pmtm9
Bound to VSC above

   |
   v

# Restored PVC in test NS
Name: mpryc-my-test-vm
DataSource: VolumeSnapshot/velero-mpryc-my-test-vm-pmtm9
→ provisioned from SAME backend snapshot data
```

4b. Restore one PVC from non shared PV only to a v2 ns

```shell
$ velero restore create   \
    --from-backup mpryc-vm-backup-modified-kubevirt-plugin \
    --include-resources persistentvolumeclaims,volumesnapshots  \
    --namespace-mappings mpryc-vm:mpryc-vm-restore-modified-kubevirt-plugin-data-v2 \
    --or-selector "velero.kubevirt.io/pvc-uid=8c52a10e-dd6b-430b-b6a3-55d1082f0d20 or velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5"
    
Restore request "mpryc-vm-backup-modified-kubevirt-plugin-20250924153204" submitted successfully.
Run `velero restore describe mpryc-vm-backup-modified-kubevirt-plugin-20250924153204` or `velero restore logs mpryc-vm-backup-modified-kubevirt-plugin-20250924153204` for more details.

$ oc get pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v2
NAME                                      STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
mpryc-my-test-vm                          Bound    pvc-5fecd96d-98c7-4e0f-82db-57801288af7f   3Gi        RWX            ocs-storagecluster-ceph-rbd   17s
mpryc-third-vm-one-pvcs-plus-shared-pvc   Bound    pvc-56eac0eb-9892-4716-a67b-01ad66a96ffa   30Gi       RWX            ocs-storagecluster-ceph-rbd   17s
```

4b. Restore all PVC from to a v3 ns

```shell
velero restore create   \
    --from-backup mpryc-vm-backup-modified-kubevirt-plugin \
    --include-resources persistentvolumeclaims,volumesnapshots  \
    --namespace-mappings mpryc-vm:mpryc-vm-restore-modified-kubevirt-plugin-data-v3

Restore request "mpryc-vm-backup-modified-kubevirt-plugin-20250924153255" submitted successfully.
Run `velero restore describe mpryc-vm-backup-modified-kubevirt-plugin-20250924153255` or `velero restore logs mpryc-vm-backup-modified-kubevirt-plugin-20250924153255` for more details.

$ oc get pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v3
NAME                                             STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
mpryc-my-test-vm                                 Bound    pvc-27e01495-9847-42f8-a88e-dee32bc6f43d   3Gi        RWX            ocs-storagecluster-ceph-rbd   42s
mpryc-sec-vm-in-same-ns                          Bound    pvc-e677bbe2-586b-4647-9e7d-08c5373817f8   30Gi       RWX            ocs-storagecluster-ceph-rbd   42s
mpryc-third-vm-one-pvcs-plus-shared-pvc          Bound    pvc-41d18530-6424-4e5e-8906-478cb680039a   30Gi       RWX            ocs-storagecluster-ceph-rbd   42s
mpryc-third-vm-two-pvcs                          Bound    pvc-4eda5e0c-c994-49db-9bcc-f09f691a52ef   30Gi       RWX            ocs-storagecluster-ceph-rbd   42s
mpryc-third-vm-two-pvcs-disk-ivory-goldfish-17   Bound    pvc-038ee2d1-ddca-4730-b05e-36c87d30b45c   5Gi        RWX            ocs-storagecluster-ceph-rbd   42s
```



```yaml
PVC: UID: c7514c0f-86a3-49d8-a8f8-18babd9c80f5
  LABEL: velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5 <-- should be preserved

PVC: UID: c7f96f1f-0051-44d7-aa12-84085e53376b
  LABEL: velero.kubevirt.io/pvc-uid=differentuservalue
```


```shell
$ oc create ns mpryc-vm-restore-modified-kubevirt-plugin-data-v4
namespace/mpryc-vm-restore-modified-kubevirt-plugin-data-v4 created

$ oc apply -f ./vm-backup.yaml 
backup.velero.io/mpryc-vm-backup-modified-kubevirt-plugin-v4 created

$ velero get backup mpryc-vm-backup-modified-kubevirt-plugin-v4
NAME                                        STATUS      ERRORS   WARNINGS   CREATED                          EXPIRES   STORAGE LOCATION   SELECTOR
mpryc-vm-backup-modified-kubevirt-plugin-v4   Completed   0        0          2025-09-24 15:39:55 +0200 CEST   29d       ts-dpa-1           <none>

$ velero restore create   \
    --from-backup mpryc-vm-backup-modified-kubevirt-plugin-v4 \
    --include-resources persistentvolumeclaims,volumesnapshots  \
    --namespace-mappings mpryc-vm:mpryc-vm-restore-modified-kubevirt-plugin-data-v4 \
    --or-selector "velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5 or velero.kubevirt.io/pvc-uid=c7f96f1f-0051-44d7-aa12-84085e53376b"

Restore request "mpryc-vm-backup-modified-kubevirt-plugin-v4-20250924154152" submitted successfully.
Run `velero restore describe mpryc-vm-backup-modified-kubevirt-plugin-v4-20250924154152` or `velero restore logs mpryc-vm-backup-modified-kubevirt-plugin-v4-20250924154152` for more details.

$ oc get pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v4
NAME                      STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
mpryc-my-test-vm          Bound    pvc-5af4e888-70c2-41a2-965f-bc18d04482a7   3Gi        RWX            ocs-storagecluster-ceph-rbd   36s
mpryc-sec-vm-in-same-ns   Bound    pvc-2f0fcd2b-244e-4518-a012-eb63ae308170   30Gi       RWX            ocs-storagecluster-ceph-rbd   36s

$ oc describe  pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v4 mpryc-my-test-vm
Labels:        app=containerized-data-importer
               app.kubernetes.io/component=storage
               app.kubernetes.io/managed-by=cdi-controller
               app.kubernetes.io/part-of=hyperconverged-cluster
               app.kubernetes.io/version=4.15.12
               kubevirt.io/created-by=ef0dc743-af73-4ab5-acc4-011a4bd6ef6d
               velero.io/backup-name=mpryc-vm-backup-modified-kubevirt-plugin-v4
               velero.io/restore-name=mpryc-vm-backup-modified-kubevirt-plugin-v4-20250924160351
               velero.io/volume-snapshot-name=velero-mpryc-my-test-vm-4k8ps
               velero.kubevirt.io/pvc-uid=c7514c0f-86a3-49d8-a8f8-18babd9c80f5


$ oc describe  pvc -n  mpryc-vm-restore-modified-kubevirt-plugin-data-v4 mpryc-sec-vm-in-same-ns
Labels:        app=containerized-data-importer
               app.kubernetes.io/component=storage
               app.kubernetes.io/managed-by=cdi-controller
               app.kubernetes.io/part-of=hyperconverged-cluster
               app.kubernetes.io/version=4.15.12
               kubevirt.io/created-by=2624f6e0-2257-4b35-9894-7f6382b44e13
               velero.io/backup-name=mpryc-vm-backup-modified-kubevirt-plugin-v4
               velero.io/restore-name=mpryc-vm-backup-modified-kubevirt-plugin-v4-20250924160351
               velero.io/volume-snapshot-name=velero-mpryc-sec-vm-in-same-ns-l2tz2
               velero.kubevirt.io/pvc-uid=differentuservalue

```