mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
Update steps for rolling back v2.5+
This commit is contained in:
@@ -11,7 +11,17 @@ 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.]({{<baseurl>}}/rancher/v2.6/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 restore completes. So Rancher will be unavailable during the restore.
|
||||
|
||||
### Scale the Rancher Deployment to 0
|
||||
|
||||
1. In the upper left corner, click **≡ > local**.
|
||||
1. From the menu on the left, click **Workload**.
|
||||
1. Under **Workload**, click on **Deployments**.
|
||||
1. At the top, click on the dropdown to adjust the filter. Select **cattle-system** as the filter.
|
||||
1. Find the row for the `rancher` deployment and click **⋮ > Edit Config**.
|
||||
1. Change **Replicas** to 0.
|
||||
1. Scroll to the bottom and click **Save**.
|
||||
|
||||
### Create the Restore Custom Resource
|
||||
|
||||
@@ -42,7 +52,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 rancher-operator scales the rancher deployment back up once the restore completes. The resources are restored in this order:
|
||||
|
||||
1. Custom Resource Definitions (CRDs)
|
||||
2. Cluster-scoped resources
|
||||
@@ -54,8 +64,28 @@ To check how the restore is progressing, you can check the logs of the operator.
|
||||
|
||||
```
|
||||
kubectl logs -n cattle-resources-system -l app.kubernetes.io/name=rancher-backup -f
|
||||
```
|
||||
|
||||
### Roll back to a previous Rancher version
|
||||
|
||||
Rancher can be rolled back using the Helm CLI. To roll back to the previous version:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### Cleanup
|
||||
|
||||
If you created the restore resource with kubectl, remove the resource to prevent a naming conflict with future restores.
|
||||
If you created the restore resource with kubectl, remove the resource to prevent a naming conflict with future restores.
|
||||
|
||||
@@ -25,7 +25,17 @@ 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.]({{<baseurl>}}/rancher/v2.6/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 restore completes. So Rancher will be unavailable during the restore.
|
||||
|
||||
### Scale the Rancher Deployment to 0
|
||||
|
||||
1. In the upper left corner, click **≡ > local**.
|
||||
1. From the menu on the left, click **Workload**.
|
||||
1. Under **Workload**, click on **Deployments**.
|
||||
1. At the top, click on the dropdown to adjust the filter. Select **cattle-system** as the filter.
|
||||
1. Find the row for the `rancher` deployment and click **⋮ > Edit Config**.
|
||||
1. Change **Replicas** to 0.
|
||||
1. Scroll to the bottom and click **Save**.
|
||||
|
||||
### Create the Restore Custom Resource
|
||||
|
||||
@@ -56,7 +66,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 rancher-operator scales the rancher deployment back up once the restore completes. The resources are restored in this order:
|
||||
|
||||
1. Custom Resource Definitions (CRDs)
|
||||
2. Cluster-scoped resources
|
||||
@@ -69,14 +79,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 +109,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]({{<baseurl>}}/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.
|
||||
Rolling back to Rancher v2.0-v2.1 is no longer supported. The instructions for rolling back to these versions are preserved [here]({{<baseurl>}}/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.
|
||||
|
||||
Reference in New Issue
Block a user