From 98eac8e277c5d8c6691c26a88f124060876629bd Mon Sep 17 00:00:00 2001 From: Billy Tat Date: Thu, 9 Sep 2021 13:42:47 -0700 Subject: [PATCH] Update steps for rolling back rancher on v2.5.0+ (#3501) * Update steps for rolling back rancher on v2.5.0+ * Change placeholder character --- .../rollbacks/_index.md | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/content/rancher/v2.5/en/installation/install-rancher-on-k8s/rollbacks/_index.md b/content/rancher/v2.5/en/installation/install-rancher-on-k8s/rollbacks/_index.md index acf3b933318..7fd6ec3e73b 100644 --- a/content/rancher/v2.5/en/installation/install-rancher-on-k8s/rollbacks/_index.md +++ b/content/rancher/v2.5/en/installation/install-rancher-on-k8s/rollbacks/_index.md @@ -25,7 +25,16 @@ A restore is performed by creating a Restore custom resource. > **Important** > > * Follow the instructions from this page for restoring rancher on the same cluster where it was backed up from. In order to migrate rancher to a new cluster, follow the steps to [migrate rancher.]({{}}/rancher/v2.5/en/backups/migrating-rancher) -> * While restoring rancher on the same setup, the operator will scale down the rancher deployment when restore starts, and it will scale back up the deployment once restore completes. So Rancher will be unavailable during the restore. +> * While restoring Rancher on the same setup, the Rancher deployment is manually scaled down before the restore starts, then the operator will scale it back up once the restore completes. So Rancher will be unavailable during the restore. + +### Scale the Rancher Deployment to 0 + +1. From the **Global** view, hover over the **local** cluster. +1. Under **Projects in local**, click on **System**. +1. From the **cattle-system** namespace section, find the `rancher-hook` deployment. +1. Select **⋮ > Edit**. +1. Change **Scalable deployment of _ pods** to `0`. +1. Scroll to the bottom and click **Save**. ### Create the Restore Custom Resource @@ -56,7 +65,7 @@ A restore is performed by creating a Restore custom resource. 1. Click **Create.** -**Result:** The rancher-operator scales down the rancher deployment during restore, and scales it back up once the restore completes. The resources are restored in this order: +**Result:** The backup file is created and updated to the target storage location. The resources are restored in this order: 1. Custom Resource Definitions (CRDs) 2. Cluster-scoped resources @@ -69,14 +78,25 @@ kubectl get pods -n cattle-resources-system kubectl logs -n cattle-resources-system -f ``` -### Roll back to the previous Rancher version +### Roll back to a previous Rancher version -Rancher can be rolled back using the Rancher UI. +Rancher can be rolled back using the Helm CLI. To roll back to the previous version: -1. In the Rancher UI, go to the local cluster. -1. Go to the System project. -1. Edit Rancher deployment and modify image to version that you are rolling back to. -1. Save changes made. +```yaml +helm rollback rancher -n cattle-system +``` + +If the previous revision is not the intended target, you can specify a revision to roll back to. To see the deployment history: + +```yaml +helm history rancher -n cattle-system +``` + +When the target revision is determined, perform the rollback. This example will roll back to revision `3`: + +```yaml +helm rollback rancher 3 -n cattle-system +``` # Rolling Back to Rancher v2.2-v2.4+ @@ -88,4 +108,4 @@ For information on how to roll back Rancher installed with Docker, refer to [thi # Rolling Back to Rancher v2.0-v2.1 -Rolling back to Rancher v2.0-v2.1 is no longer supported. The instructions for rolling back to these versions are preserved [here]({{}}/rancher/v2.0-v2.4/en/backups/restore/rke-restore/v2.0-v2.1) and are intended to be used only in cases where upgrading to Rancher v2.2+ is not feasible. \ No newline at end of file +Rolling back to Rancher v2.0-v2.1 is no longer supported. The instructions for rolling back to these versions are preserved [here]({{}}/rancher/v2.0-v2.4/en/backups/restore/rke-restore/v2.0-v2.1) and are intended to be used only in cases where upgrading to Rancher v2.2+ is not feasible.