vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.65k stars 1.39k forks source link

Persistent volume is not a supported volume type for snapshots. #5975

Closed MBmousavi closed 1 year ago

MBmousavi commented 1 year ago

Hello My Velero version: v1.9.6 I have an on-premise kubernetes, I wanna create backups from namespaces including PVs. The "VolumeSnapshotLocation" can be a Minio storage or some public cloud storage.

I've installed Velero like this:

velero install \
      --provider aws \
      --plugins velero/velero-plugin-for-aws:v1.5.4 \
      --bucket k8s-stage \
      --secret-file ./credentials-velero \
      --use-volume-snapshots=true \
      --snapshot-location-config region=eu-central-2 \
      --backup-location-config region=eu-central-2,s3ForcePathStyle="true",s3Url=https://My-s3.com \
      --use-restic

The Storage of the PVs are on Ceph cluster. StorageClass is "rook-ceph-block-xfs" . I want create backup from this PVs that are located in Ceph, to a public cloud or another on-premise Minio storage.

But I get this error:

time="2023-03-10T14:41:28Z" level=info msg="label \"topology.kubernetes.io/zone\" is not present on PersistentVolume, checking deprecated label..." backup=velero/postgres1 logSource="pkg/backup/item_backupper.go:446" name=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be namespace= persistentVolume=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be resource=persistentvolumes
time="2023-03-10T14:41:28Z" level=info msg="label \"failure-domain.beta.kubernetes.io/zone\" is not present on PersistentVolume" backup=velero/postgres1 logSource="pkg/backup/item_backupper.go:450" name=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be namespace= persistentVolume=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be resource=persistentvolumes
time="2023-03-10T14:41:28Z" level=info msg="zone info not available in nodeAffinity requirements" backup=velero/postgres1 logSource="pkg/backup/item_backupper.go:455" name=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be namespace= persistentVolume=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be resource=persistentvolumes
time="2023-03-10T14:41:28Z" level=info msg="No volume ID returned by volume snapshotter for persistent volume" backup=velero/postgres1 logSource="pkg/backup/item_backupper.go:479" name=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be namespace= persistentVolume=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be resource=persistentvolumes volumeSnapshotLocation=default
time="2023-03-10T14:41:28Z" level=info msg="Persistent volume is not a supported volume type for snapshots, skipping." backup=velero/postgres1 logSource="pkg/backup/item_backupper.go:490" name=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be namespace= persistentVolume=pvc-d27b0501-d9f5-4b62-8f2a-da302b6dd5be resource=persistentvolumes

Can someone help me with that? Thanks!

ywk253100 commented 1 year ago

The AWS plugin cannot handle the snapshots of Ceph, CSI plugin is what you need

ywk253100 commented 1 year ago

I'm closing this issue, free feel to reopen it if you have further questions