velero: Not able to restore EFS volumes using restic
Backup is completed successfully as can be seen here -
Completed:
xyz/app-xyz-64b9cdb6cb-tbbn8: app-common-volume, app-log-volume```
But while restore, the PVCs are stuck in pending state -
`Name: app-common-volume-pvc
Namespace: xyz
StorageClass: efs-sc
Status: Pending
Volume:
Labels: prophecy.io/cluster=prophecydev
prophecy.io/component=app
prophecy.io/controlplane=xyz
prophecy.io/logconfmapversion=1659308
velero.io/backup-name=xyz-backup2
velero.io/restore-name=xyz-backup2-20200921165054
Annotations: volume.beta.kubernetes.io/storage-provisioner: efs.csi.aws.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: app-xyz-64b9cdb6cb-tbbn8
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ExternalProvisioning 64s (x202 over 51m) persistentvolume-controller waiting for a volume to be created, either by external provisioner "efs.csi.aws.com" or manually created by system administrator`
Not sure why it doesnt get created on its own when PV resource itself is part of backup
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 15 (3 by maintainers)
I’m also facing the same problem. @vaishali-prophecy as a workaround, you can create the PV by hand, just be sure to correctly setup the PV name, PVC namespace and name, as well as volumeHandle parts (for example using aws efs):
Then you can run the restore process and everything should work fine.
Based on the message
waiting for a volume to be created, either by external provisioner "efs.csi.aws.com"
, the EFS CSI driver hasn’t yet created the volume.Doing some Googling, as I’m not familiar with the driver, I came across their documentation which states
Docs in https://github.com/kubernetes-sigs/aws-efs-csi-driver state this, too. So it appears AWS has changed how EFS is provisioned and we need to revisit how it’s approached in Velero; this is going to require some research on our part.
Hi @nrb ,
Yaml for the PV resource -
Yaml for storage class -
Version of velero - 1.4 K8s version - 1.16
Note that PV resource itself isn’t restored on restore action for the PVCs which are marked in pod annotation. Also just shared PV yaml corresponding to some other deployment as the previous one doesnt exist as of now.