Repository navigation
Is it possible to restore PVC backed by hosthpath provider #9568
Unanswered
VarshitAgarwal
asked this question in
Community support Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
During testing with Velero, I encountered difficulties restoring Kubernetes backups for StatefulSet objects when the underlying storage used hostPath volumes.
Below is the summary of findings:
Observation
Backup of PVCs worked without issue and put into backup storage location ( for now i have used MINIO)
On restore (tested by deleting a Postgres StatefulSet and restoring the namespace), Velero injected the init container and attempted to restore data into the volume.
Restore failed with repeated errors:
ERROR looking filesystem restore done file /restores/postgres-data/.velero/684643ed-e647-4fca-8380-b8e9af056656: stat /restores/postgres-data/.velero/684643ed-e647-4fca-8380-b8e9af056656: permission deniedAlthough velero provide the way to give the permission to init container by customize the restore helper container by doing something like this
Please correct me if i am wrong
Velero’s restore agent attempts to write/read .velero/ inside the host-mounted directory.
Since hostPath directories are owned by the host OS, not Kubernetes, Velero pods often lack the required filesystem permissions.
Even if permissions were granted, restoring to arbitrary host paths would require privileged access to the node filesystem.
All reactions