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

Profile snapshot/restore #21

Open
jorgemoralespou opened this issue Oct 10, 2016 · 2 comments
Open

Profile snapshot/restore #21

jorgemoralespou opened this issue Oct 10, 2016 · 2 comments

Comments

@jorgemoralespou
Copy link
Contributor

Allow for snapshoting a profile. This will tar up the profile contents into a common location, so that later can be restored. This way we can provide a way to mess up clusters and be able to revert back to a working state.

Commands could be:

  • snapshot-save
  • snapshot-list
  • snapshot-restore

The restoration of a profile can have unknown issues if some images are no longer existing, but this is something we need to assume for now.

@bjartek
Copy link
Contributor

bjartek commented Oct 15, 2016

So if we have a new setting OPENSHIFT_CLUSTER_BACKUP_DIR defaulting to .oc/backup.

snapshot-save will take a profile dir, tar gz it down and put it into .oc/backup.

snapshot-list will just list all the tar files in .oc/backup

snapshot-restore will untar a tar file from .oc/backup into ./oc/profiles

Was that kinda what you had in mind? Or do we need to tar more then just the conents of the profile dir?

@jorgemoralespou
Copy link
Contributor Author

Yeah,
That was the basic idea, but some things we need to look into:

  • snapshot-save
    • Is there any problem for snapshoting a running cluster? if yes, then, snapshot should always need to be on a stopped cluster and verification need to happen
    • Should we limit the ammount of snapshots and cycle when max reached, removing oldest snapshot? If yes, we should make this clear, and allow for user to delete the snapshot he don't want to preserve before.
    • Maybe it's worth to have 2 types of snapshots (temporal, which can be cycled and golden, which need to be removed by the user and are not cycled)
  • snapshot-restore:
    • Should there be a profile created, option to overwrite.
    • When overwriting a profile, if up bring it down restore and then up (or last up make it optional)
  • snapshot-list:
    • If 2 types of snapshots, list them, as well as number of snapshots in configuration (this brings the fact that, should we need a central configuration file in ($HOME/.oc/config?)
  • snapshot-remove <PROFILE_NAME>:
    • Remove old snapshots by name for a given progile
  • snapshot-clear:
    • Remove all snapshots for a given profile

This also introduces the question, should snapshots live in the profile (maybe the temporal yes and the golden not). In this way you can have master configs that can be recreated and safe-points.

Any more ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants