-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug? how to restic restore only one pvc #6690
Comments
Restic restore requires a pod to be restored with the PVC, since the pod mounts the PVC, and then the node agent pod on the same node as the restored pod has access to the volume. You need to restore the pod with the PVC in order to use restic restore. If the pod belongs to a deployment, it may also fail if the deployment is scaled down to 0, since the deployment may kill the pod as soon as it's restored. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands. |
This issue was closed because it has been stalled for 14 days with no activity. |
I saw a workaround here, but it is not very elegant: https://www.ergton.com/velero-pvc-only-restore.html @Lyndon-Li will there be a solution to this problem? |
For volume only restore, there are ongoing discussions and a design PR #7481. For now, here are the suggestions:
|
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands. |
unstale |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands. |
unstale |
What steps did you take and what happened:
We make a full velero backup of a specific namespace and also restic backup the pvcs/pvs in that namespace (no snapshot backups).
Then we restore the lastest backup for a subset of resources selected by label.
velero restore create --from-schedule my-schedule --selector "mylabel=myvalue"
The set consists of a pvc/pv and an sts with 1 pod.
As long as we delete the sts and the pvc, the restore succeeds, including the restic restore of the data within the pvc.
However if we just scale down the sts to 0 and only delete the pvc, then both of the following approaches fail:
The first will never end because of an error, that the sts's pod can't be queried.
The second actually succeeds, but without doing the restic restore, the pvc is restored empty.
We use velero v1.11.1
What did you expect to happen:
At least with the latter approach, I would have expected the data to be restored.
velero restore create --from-schedule my-schedule --selector "mylabel=myvalue" --include-resources persistentvolumeclaims,persistentvolumes
Is this a bug? Or how would one do a restic restore of only the pvc/pv without touching the related resources (sts in our case)?
Environment:
velero version
):velero client config get features
):kubectl version
):The Schedule
The text was updated successfully, but these errors were encountered: