提问人:Eric Hemmerlin 提问时间:3/20/2023 更新时间:5/14/2023 访问量:1462
持久卷不是快照支持的卷类型(Velero、MinIO、FSB)
Persistent volume is not a supported volume type for snapshots (Velero, MinIO, FSB)
问:
我们需要在本地 Kubernetes 集群上备份 PV,因此我们安装了链接到 MinIO 的 Velero,以及 Velero 的文件系统备份。未备份任何 PV,也不会显示任何错误,只有此提及出现在日志中“持久卷不是快照支持的卷类型,正在跳过”。是否有人能够在不使用外部云提供商的情况下在本地集群上备份 PV?
详
Velero 是使用以下命令安装的(credentials-minio 包含 MinIO 的存储桶访问密钥):
velero install \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.2.1 \
--bucket ka-backup \
--secret-file ./credentials-minio \
--use-node-agent \
--backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://minio-1679064025.minio.svc:9000 \
--snapshot-location-config region=minio
命名空间备份的结果未显示错误,也未显示如下所示的警告,并且阶段的状态已完成。
velero backup describe acme -n velero --kubeconfig ../VKATEST.config
Name: acme
Namespace: velero
Labels: velero.io/storage-location=default
Annotations: velero.io/source-cluster-k8s-gitversion=v1.25.6
velero.io/source-cluster-k8s-major-version=1
velero.io/source-cluster-k8s-minor-version=25
Phase: Completed
Errors: 0
Warnings: 0
Namespaces:
Included: acme
Excluded: <none>
Resources:
Included: *
Excluded: <none>
Cluster-scoped: auto
Label selector: <none>
Storage Location: default
Velero-Native Snapshot PVs: auto
TTL: 720h0m0s
CSISnapshotTimeout: 10m0s
Hooks: <none>
Backup Format Version: 1.1.0
Started: 2023-03-20 14:40:18 +0100 CET
Completed: 2023-03-20 14:40:29 +0100 CET
Expiration: 2023-04-19 15:40:18 +0200 CEST
Total items to be backed up: 437
Items backed up: 437
Velero-Native Snapshots: <none included>
在日志中,我们可以在以下摘录的末尾读取:“持久卷不是快照支持的卷类型,跳过”。
level=info msg="Backing up item" backup=velero/acme logSource="pkg/backup/item_backupper.go:132" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg="Executing takePVSnapshot" backup=velero/acme logSource="pkg/backup/item_backupper.go:412" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= resource=persistentvolumes
level=info msg="label \"topology.kubernetes.io/zone\" is not present on PersistentVolume, checking deprecated label..." backup=velero/acme logSource="pkg/backup/item_backupper.go:445" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="label \"failure-domain.beta.kubernetes.io/zone\" is not present on PersistentVolume" backup=velero/acme logSource="pkg/backup/item_backupper.go:449" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="zone info not available in nodeAffinity requirements" backup=velero/acme logSource="pkg/backup/item_backupper.go:454" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
level=info msg="No volume ID returned by volume snapshotter for persistent volume" backup=velero/acme logSource="pkg/backup/item_backupper.go:478" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes volumeSnapshotLocation=default
level=info msg="Persistent volume is not a supported volume type for snapshots, skipping." backup=velero/acme logSource="pkg/backup/item_backupper.go:489" name=cassandra-logs-local-storage-fra-vkatest-ml5 namespace= persistentVolume=cassandra-logs-local-storage-fra-vkatest-ml5 resource=persistentvolumes
如果您有线索能够在本地集群上备份 PV,而无需使用外部云提供商,请告诉我们。
答:
1赞
SikiShen
3/28/2023
#1
在执行 velero 备份时,您是否添加了选项 --default-volumes-to-restic(对于 1.7 等旧版本)或 --default-volumes-to-fs-backup(新版本)? 可能是同样的问题,例如: Velero - 还原备份时,卷快照不包含任何数据
评论
0赞
Eric Hemmerlin
4/6/2023
谢谢你是对的,@SikiShen你是对的,我缺少--default-volumes-to-fs-backup标志。
评论