Open Heiko-san opened 1 year ago
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 It can be quite messy if you need to restore the pod and it's configmaps and secrets etc just to restore the volume, and when the restore is done you delete those objects and reinstall the helm chart.
@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:
Immediate
volumes at present. So if you have to use WaitForFirstConsumer
volumes, you need to wait for a further fix (see issue #8044).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.
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.
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