-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
clusterctl backup/restore #3441
Comments
/assign I can take a look at this |
so basically, we should create a json file that contains |
It is not clear to me if we are going to implement two new top level commands or if we are going to make backup and restore as move options e.g. clusterct move --to-file (backup) However, I would break the implementation down into two logical parts.
Also, given that the target scenario is recovery from a disaster, I think the Pause/Unpause logic should not be triggered. |
We should probably first figure out the plan for move #3354 |
ok, I will wait for #3354 before work on this , thanks for the reminder @vincepri @fabriziopandini |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
/lifecycle frozen |
Hi all - @dvonthenen and I have started looking into this and will hopefully have something to contribute back soon. Our approach would be similar to what's been discussed before.
|
@jpmcb thanks for the update. Last but not least, we should consider that move is now going to include global resources (#3042 (comment)); this could make backup restore trickier given the namespaced nature of move. |
Related slack thread: https://kubernetes.slack.com/archives/C8TSNPY4T/p1596471116438700
User Story
As an operator I would like to take backups of a workload cluster's CAPx resources on the management cluster in order to be able to restore this backup to a different management cluster in a disaster recovery scenario (total loss of management cluster).
Detailed Description
There is a lot of code in
clusterctl move
that ensures clusters are paused, objects are created in the correct order, and controller and owner references are set correctly.All this exact same logic also applies to taking and restoring backups.
The idea would be to take a lot of code from /cmd/clusterctl/client/cluster/mover.go and /cmd/clusterctl/client/cluster/objectgraph.go, move some of it into a new library, and build
backup
andrestore
commands.At the top level, I see the backup performing the following steps:
Cluster
UnstructuredList
from a given namespace (same asmover.go
)The restore would:
UnstructuredList
from file on disk (namespace can then be inferred from the objects in that listobjectgraph
getMoveSequence
to figure out in which order to restore.Cluster
Anything else you would like to add:
Depending on how this code ends up structured, this could become a new public package which could be imported by something like a Velero plugin. This would make Velero inherently aware of CAPx without duplicating too much code.
/kind feature
/area clusterctl
The text was updated successfully, but these errors were encountered: