Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion modules/backup-etcd-hosted-cluster.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ The following example uses signature version 2. If you are in a region that supp
[source,terminal]
----
BUCKET_NAME=somebucket
CLUSTER_NAME=cluster_name
FILEPATH="/${BUCKET_NAME}/${CLUSTER_NAME}-snapshot.db"
CONTENT_TYPE="application/x-compressed-tar"
DATE_VALUE=`date -R`
SIGNATURE_STRING="PUT\n\n${CONTENT_TYPE}\n${DATE_VALUE}\n${FILEPATH}"
ACCESS_KEY=accesskey
SECRET_KEY=secret
SIGNATURE_HASH=`echo -en ${SIGNATURE_STRING} | openssl sha1 -hmac ${SECRET_KEY} -binary | base64`
HOSTED_CLUSTER_NAMESPACE=hosted_cluster_namespace

oc exec -it etcd-0 -n ${HOSTED_CLUSTER_NAMESPACE} -- curl -X PUT -T "/var/lib/data/snapshot.db" \
-H "Host: ${BUCKET_NAME}.s3.amazonaws.com" \
Expand Down Expand Up @@ -89,6 +91,20 @@ $ oc get secret <hosted_cluster_name>-etcd-encryption-key -o=jsonpath='{.data.ke
+
You can decrypt this key when restoring a snapshot on a new cluster.

. Restart all etcd-writer deployments by entering the following command:
+
[source,terminal]
----
$ oc scale deployment -n <control_plane_namespace> --replicas=3 kube-apiserver openshift-apiserver openshift-oauth-apiserver
----

. Resume the reconciliation of the hosted cluster by entering the following command:
+
[source,terminal]
----
$ oc patch -n <hosted_cluster_namespace> -p '[\{"op": "remove", "path": "/spec/pausedUntil"}]' --type=json
----

.Next steps

Restore the etcd snapshot.
Restore the etcd snapshot.