Skip to content
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

Add option to back up all volumes by default with restic #1871

Closed
skriss opened this issue Sep 12, 2019 · 8 comments · Fixed by #2611
Closed

Add option to back up all volumes by default with restic #1871

skriss opened this issue Sep 12, 2019 · 8 comments · Fixed by #2611
Assignees
Labels
Enhancement/User End-User Enhancement to Velero Restic Relates to the restic integration
Milestone

Comments

@skriss
Copy link
Member

skriss commented Sep 12, 2019

Describe the problem/challenge you have
Right now, Velero uses an "opt-in" approach to getting volumes backups with restic. Every pod containing a volume to be backed up must be annotated with the volume's name in order for Velero/restic to back it up. This can be burdensome for users.

Describe the solution you'd like
We should consider a mode where volumes are backed up by default if restic is enabled, and the user can "opt-out" any volumes that they don't want to be backed up.

Some questions around how this should work:

  • should we back up all pod volumes, or just PVCs, by default?
  • what does the "opt out" UX look like? Annotation on pod/PVC?
  • should we add a new spec field to backups, e.g. ResticBackupVolumes, that must be true in order to get the opt-in behavior? Or should it be the default behavior?

xref #1586 (item 2)

@skriss skriss added Enhancement/User End-User Enhancement to Velero Needs Product Blocked needing input or feedback from Product Restic Relates to the restic integration labels Sep 12, 2019
@adityagu0910
Copy link

In my view

  • Velero should backup all PVCs(excluding those are marked manually to not backed up ) available in k8s cluster those are attached to running pods(pods - which are being backed-up as part of velero backup process)
  • Manual Exclusion annotation can be done at pod level or namespace level. If done at namespace level then it should ignore all its pod for restic backup and if it is done at pod level then it should ignore only that pod in that namespace.

annotation something like this

kubectl annotate namespace/"NAMESPACE_NAME" backup.velero.io/backup-volumes-excludes=yes
kubectl -n "NAMESPACE_NAME" annotate pod/"POD_NAME" backup.velero.io/backup-volumes-excludes="VOLUME_NAME"

Currently I am using bash script to do this. I run this script before full cluster backup to annotate my pod if it is recreated or some new pod added with PVC.

annotate-pod-restic.txt

@skriss
Copy link
Member Author

skriss commented Sep 16, 2019

Look at backing up PVCs that don't have snapshotters by default
Annotation to opt out

@skriss skriss added P2 - Long-term important and removed Needs Product Blocked needing input or feedback from Product labels Sep 16, 2019
@prydonius
Copy link
Contributor

prydonius commented Sep 16, 2019

Would this be considered a breaking change? Users using the annotation today to backup select volumes will find that all their PVC volumes are now being backed up.

Also, what about the case where you are using both a snapshotter and restic, today I believe the annotation takes precedence, sounds like with this proposal the snapshotter will always take precedence.

@skriss
Copy link
Member Author

skriss commented Sep 16, 2019

Still need to flesh out a detailed proposal, but it potentially could be a breaking behavior change (though unlikely to be a breaking API change). If we're not comfortable with that, we can choose to add a flag somewhere (on the backup, on the server) to opt into this behavior.

@zakkg3
Copy link

zakkg3 commented Mar 16, 2020

check this
https://github.com/zakkg3/podannotator

Just run annotator namespace1 namespace2 and this will annotate your pvc's to be backed up by velero.

@carlisia
Copy link
Contributor

I added this topic to our community meeting tomorrow (3/31): https://hackmd.io/Jq6F5zqZR7S80CeDWUklkA?both#March-31-2020.

@skriss
Copy link
Member Author

skriss commented May 1, 2020

cc @stephbman

@skriss skriss added this to the v1.5 milestone May 1, 2020
@stephbman
Copy link
Contributor

stephbman commented May 11, 2020

I've added the topic to our community meeting agenda for 5/12 here: https://hackmd.io/Jq6F5zqZR7S80CeDWUklkA?view

A detailed product requirements document can be accessed here:
https://drive.google.com/file/d/1i5IQfuOtsHhGuYiiTrCZ6zjVhtKWLRqV/view?usp=sharing

Relates to these issues:
#605
#2375

cc: @skriss and @carlisia

@skriss skriss changed the title Consider backing up volumes by default when restic is enabled Add option to back up all volumes by default with restic May 18, 2020
@stephbman stephbman added the Epic label Jun 4, 2020
@nrb nrb closed this as completed in #2611 Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement/User End-User Enhancement to Velero Restic Relates to the restic integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants