Velero:使用CSI快照进行备份和恢复



使用以下命令安装velero

velero install  --provider aws  --plugins velero/velero-plugin-for-aws:v1.4.0,velero/velero-plugin-for-csi:v0.3.0   --bucket pbsnap   --secret-file ./cred-velero   --use-volume-snapshots=true  --backup-location-config region=us-geo,s3ForcePathStyle="true",s3Url=https://s3.us.cloud-object-storage.appdomain.cloud   --snapshot-location-config region="us-geo" --features=EnableCSI

备份已成功完成。恢复后,PVC处于挂起状态。

wordpress % velero restore get
NAME      BACKUP    STATUS      STARTED                         COMPLETED                       ERRORS   WARNINGS   CREATED                         SELECTOR
pbsnap3   pbsnap3   Completed   2022-08-30 11:39:15 +0530 IST   2022-08-30 11:39:19 +0530 IST   0        3          2022-08-30 11:39:15 +0530 IST   <none>
ambikanair@AmbikaNairsMBP wordpress % 
Type    Reason                Age                    From                         Message
----    ------                ----                   ----                         -------
Normal  ExternalProvisioning  4m8s (x26 over 9m56s)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "vpc.block.csi.ibm.io" or manually created by system administrato
ambikanair@AmbikaNairsMBP wordpress % kubectl get volumesnapshotcontent
NAME                                               READYTOUSE   RESTORESIZE   DELETIONPOLICY   DRIVER                 VOLUMESNAPSHOTCLASS   VOLUMESNAPSHOT                              VOLUMESNAPSHOTNAMESPACE                   AGE
snapcontent-477ee083-76ec-487d-ae97-0258ed45a3cc   true         1073741824    Retain           vpc.block.csi.ibm.io   snapshotclass         name-b72e983b-4739-4875-be35-96bac1f94a6d   ns-b72e983b-4739-4875-be35-96bac1f94a6d   35m
snapcontent-56859adc-2892-4bc8-8b12-4be06d7a9520   true         1073741824    Retain           vpc.block.csi.ibm.io   snapshotclass         name-e91b00ba-b1f4-424b-8c45-d1bafebf3e5a   ns-e91b00ba-b1f4-424b-8c45-d1bafebf3e5a   35m
velero-velero-mysql-pv-claim-v5b24-7c7jq           true         1073741824    Retain           vpc.block.csi.ibm.io   snapshotclass         velero-mysql-pv-claim-v5b24                 default                                   27m
velero-velero-wp-pv-claim-726vt-977rq              true         1073741824    Retain           vpc.block.csi.ibm.io   snapshotclass         velero-wp-pv-claim-726vt                    default                                   27m
ambikanair@AmbikaNairsMBP wordpress % kubectl get volumesnapshot       
NAME                          READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT                      RESTORESIZE   SNAPSHOTCLASS   SNAPSHOTCONTENT                            CREATIONTIME   AGE
velero-mysql-pv-claim-v5b24   true                     velero-velero-mysql-pv-claim-v5b24-7c7jq   1Gi           snapshotclass   velero-velero-mysql-pv-claim-v5b24-7c7jq   35m            27m
velero-wp-pv-claim-726vt      true                     velero-velero-wp-pv-claim-726vt-977rq      1Gi           snapshotclass   velero-velero-wp-pv-claim-726vt-977rq      35m            27m

不过,我可以从上面的快照手动创建PVC。我是不是在维莱罗的台阶上错过了什么。

更新

我得到了维莱罗松弛频道的支持。我不得不升级我的provisioner版本。现在一切看起来都很好!!!

你必须确保你的Velero版本与Kubernetes版本匹配,就像在OADP中一样:https://github.com/openshift/oadp-operator.

对于Kubernetes检查:

https://github.com/vmware-tanzu/velero#velero-相容性矩阵

请确保使用最新版本:https://velero.io/docs/v1.1.0/aws-config/并按照输出建议检查恢复日志中的错误。

如果你发现了什么,请更新问题,插件中最近有一个错误修复程序可以修复它:https://github.com/vmware-tanzu/velero-plugin-for-csi/pull/126

csi provisioner升级到3.2.1,然后我的问题得到了解决。

相关内容

  • 没有找到相关文章

最新更新