k8up icon indicating copy to clipboard operation
k8up copied to clipboard

RestoreSpec restoreFilter should also set --path filter

Open dereulenspiegel opened this issue 1 year ago • 4 comments

Description

When restoring from a repository in a namespace with multiple PVC it can happen the latest snapshot actually doesn't contain the necessary data. This happens because with multiple PVC multiple snapshots are taken in short succession during a backup operation. Since restoring from the latest snapshot seems to be the default behavior of the Restore operation, imho the correct latest snapshot should be selected. The restoreFilter should therefore also set the --path option of restic, to let restic automatically select the correct snapshot. Alternatively this could also be done based on the claimName in the folder restore method.

Additional Context

No response

Logs

No response

Expected Behavior

k8up selects the correct snapshot to restore previously saved data to a PVC instead of generally the latest snapshot, which might not contain the necessary data when multiple PVC are backed up within a single namespace.

Steps To Reproduce

No response

Version of K8up

v2.7.1

Version of Kubernetes

1.27.1

Distribution of Kubernetes

k3s

dereulenspiegel avatar Jun 12 '23 14:06 dereulenspiegel