0

Installed velero using below command

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

Backup done successfully . After restore, PVCs are pending state.

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

I am able to manually create PVC from above snapshot though. Am I missing something in velero steps.

UPDATE

I got support from velero slack channel. I had to upgrade my provisioner version. Now all looks good !!!

ambikanair
  • 4,004
  • 11
  • 43
  • 83

2 Answers2

1

You have to make sure your Velero version matches the Kubernetes version, like in OADP : https://github.com/openshift/oadp-operator.

For Kubernetes check:

https://github.com/vmware-tanzu/velero#velero-compatabilty-matrix

Make sure to use the latest version: https://velero.io/docs/v1.1.0/aws-config/ and check the restore logs for errors as the output suggests.

Update the question if you found anything please, there is a recent bugfix in the plugin that may fix it : https://github.com/vmware-tanzu/velero-plugin-for-csi/pull/126

Vincent Gerris
  • 7,228
  • 1
  • 24
  • 22
  • 1
    Got the fix!! updated the question as well. Thanks for reminding. – ambikanair Nov 21 '22 at 08:33
  • Great! upvotes are appreciated and feel free to mark as answered. Details on what you did precisely can be useful for others, so please share them (like answer your own question if needed). Thanks! – Vincent Gerris Nov 22 '22 at 09:19
0

csi-provisioner upgraded to 3.2.1 and then my issue was solved.

ambikanair
  • 4,004
  • 11
  • 43
  • 83