Closed Lingkar closed 4 months ago
I suggest doing a backup with --snapshot-volumes=false
at first.
But it requires setting the PVC's DeletionPolicy
to Retain
to restore the PV with the same content as the backed-up PV.
@blackpiglet Thanks for your response, I will try it out! DeletionPolicy are on Retain, so that will not be an issue.
@blackpiglet Works like a charm, thanks!
Describe the problem/challenge you have In the scenario of a full cluster restore, we might not want to restore-volumes based on the latest snapshot, as this can loose the latest data. In such a scenario I would expect running a restore with the flag
--restore-volumes=false
would just recreate the PV and PVC k8s resources, just like it does without the CSI plugin installed. And thus pointing to the already provisioned disks, without restoring and creating new ones from snapshot.Without the CSI plugin:
velero restore create --from-backup backup-1 --include-resources=pvc,pv --restore-volumes=false
When using the CSI plugin I seem to loose the ability to just restore the PV and PVC resources without restoring the data on the volumes. I guess due to the PV's being skipped in favor of restoring from snapshot, even though --restore-volumes=false
With CSI plugin:
velero restore create --from-backup backup-2 --include-resources=pvc,pv --restore-volumes=false
Describe the solution you'd like I would like the CSI plugin to not skip the PersistentVolume resources when the flag --restore-volumes=false is used. Thus behaving in a similar way when the CSI plugin is not used. Or I would love to hear which part I am missing. And if this is not possible why it is not possible and the design decision behind it, or if I am approaching this problem incorrectly.
Anything else you would like to add: If this seems like a good "first-issue" I would love to discuss it further and try to pick it up.
Environment:
velero version
):kubectl version
):/etc/os-release
):Kubernetes nodes are running: AKSUbuntu-2204gen2containerd-202404.16.0
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.