openshift-evangelists / oc-cluster-wrapper

oc cluster up bash wrapper
Apache License 2.0
144 stars 72 forks source link

Profile snapshot/restore #21

Open jorgemoralespou opened 7 years ago

jorgemoralespou commented 7 years ago

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:

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 commented 7 years ago

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 commented 7 years ago

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

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?