vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.57k stars 1.39k forks source link

Persistent Volume backup policy in Velero #5340

Open pradeepkchaturvedi opened 2 years ago

pradeepkchaturvedi commented 2 years ago

In Velero, there are are multiple Resource filtering options for K8S resource backup and Restore. When it comes to PVs there not enough options. I would like Velero to allow user to define PV backup strategy/policy for their cluster. For example, I want to below mentioned strategy for PVs backup in below priority order

There be separate option to mention for how many volume snapshot should be retained. There should be options to define skip volume list from backup based on size, type, storage class etc.

There are ways in Velero to achieve this using defaultVolumesToRestic, annotation of pod volume for Restic etc. however these needs manually tracking PVs in the cluster to add annotations. With Velero supporting PVs backup strategy/policy, i would like to remove need to manually annotating Pod volumes for backup.

This would help K8S operators to better plan PV backup with lesser manual interventions.

blackpiglet commented 1 year ago

Hi, @pradeepkchaturvedi. There are some points need to confirm with you in the above description.

reasonerjt commented 1 year ago

There are quite a few different requirements involved in this issue.

5035 has been opened and we will use that issue to track the requirement to enable the user to select what PVs will be included in the backup, which we are actively planning for v1.11.

For other requirements, let's open new issues after they are clarified and we'll triage them in future releases (after v1.11).