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

Make it easy to mark/unmark a volume for restic backup #605

Open
ncdc opened this issue Jun 25, 2018 · 4 comments
Open

Make it easy to mark/unmark a volume for restic backup #605

ncdc opened this issue Jun 25, 2018 · 4 comments
Labels
Enhancement/User End-User Enhancement to Velero Icebox We see the value, but it is not slated for the next couple releases. kind/requirement Restic Relates to the restic integration Reviewed Q2 2021
Projects

Comments

@ncdc
Copy link
Contributor

ncdc commented Jun 25, 2018

The current mechanism to mark a volume for a restic backup is

kubectl -n YOUR_POD_NAMESPACE annotate pod/YOUR_POD_NAME backup.ark.heptio.com/backup-volumes=YOUR_VOLUME_NAME_1,YOUR_VOLUME_NAME_2,...

It would be nice to make this easier with an ark subcommand. We should also make sure we can support various resources that contain pod specs (deployments, statefulsets, replicasets, jobs, replication controllers, pods themselves, ...)

@ncdc ncdc added the Enhancement/User End-User Enhancement to Velero label Jun 25, 2018
@ncdc ncdc added this to To do in Ark Jun 25, 2018
@agolomoodysaada
Copy link

agolomoodysaada commented Feb 19, 2019

As a good starting point, I created this snippet that helps set up annotation commands for you. Install fx and then run

kubectl get pods --all-namespaces -o json | fx 'l => l.items' 'i => i.reduce((acc, p) => {acc.push("kubectl -n " + p.metadata.namespace + " annotate pod/" + p.metadata.name + " backup.ark.heptio.com/backup-volumes=" + p.spec.volumes.map(v => v.name).join(",")); return acc;}, [])'

Which outputs the following structure

[
...
  "kubectl -n redis annotate pod/redis-master-4 backup.ark.heptio.com/backup-volumes=redis-data,redis-conf,default-token-lqmpv"
...
]

It would be awesome if ark itself could help manage that out of the box and maybe take a selector as an argument. For example ark restic annotate -n mynamespace -l app=mongodb --all-volumes

@zakkg3
Copy link

zakkg3 commented Sep 6, 2019

I wrote a cli for this, just run python3 annotate.py namespace1 namespace2
https://github.com/zakkg3/podannotator
requires python3
It will annotate all pods with PVC in the given namespace(s).

@carlisia
Copy link
Contributor

Related: #1871.

@carlisia
Copy link
Contributor

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

@eleanor-millman eleanor-millman added Icebox We see the value, but it is not slated for the next couple releases. Reviewed Q2 2021 labels May 4, 2021
@reasonerjt reasonerjt added kind/requirement Icebox We see the value, but it is not slated for the next couple releases. Reviewed Q2 2021 Restic Relates to the restic integration Enhancement/User End-User Enhancement to Velero and removed Enhancement/User End-User Enhancement to Velero Restic Relates to the restic integration Reviewed Q2 2021 Icebox We see the value, but it is not slated for the next couple releases. labels May 20, 2022
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 Icebox We see the value, but it is not slated for the next couple releases. kind/requirement Restic Relates to the restic integration Reviewed Q2 2021
Projects
No open projects
Ark
  
To do
Development

No branches or pull requests

7 participants