mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 12:38:05 +00:00
content complete
This commit is contained in:
committed by
Denise Schannon
parent
3ac4f79c04
commit
7a3a12b688
@@ -32,7 +32,7 @@ If you encounter a disaster scenario, you can restore your Rancher Server to you
|
||||
|
||||
>**Warning!** This command deletes all current state data from your Rancher Server container. Any changes saved after your backup tarball was created will be lost.
|
||||
|
||||
1. Restart your Rancher Server container. It will restart using your backup tarball.
|
||||
1. Restart your Rancher Server container. It will restart using your backup data.
|
||||
|
||||
```
|
||||
docker start <RANCHER_CONTAINER_NAME>
|
||||
|
||||
@@ -11,29 +11,39 @@ restore the backup you created while completing [Single Node Upgrade]({{< baseur
|
||||
|
||||
>**Warning!** Rolling back to a previous version of Rancher destroys any changes made to Rancher following the upgrade. Unrecoverable data loss may occur.
|
||||
|
||||
1. Pull the version of Rancher that you were running prior to upgrade.
|
||||
1. Pull the version of Rancher that you were running prior to upgrade (which was the version that you wrote down for the [prereq]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#prereq).
|
||||
|
||||
```
|
||||
docker pull rancher/rancher:<PRIOR_VERSION>
|
||||
docker pull rancher/rancher:<PRIOR_RANCHER_VERSION>
|
||||
```
|
||||
For example, if you were running Rancher v2.0.5 before upgrade, pull v2.0.5.
|
||||
|
||||
2. Stop the container currently running Rancher Server. Replace `<RANCHER_CONTAINER_ID>` with the ID of your Rancher container.
|
||||
1. Stop the container currently running Rancher Server. Replace `<RANCHER_CONTAINER_NAME>` with the name of your Rancher container.
|
||||
|
||||
```
|
||||
docker stop <RANCHER_CONTAINER_ID>
|
||||
docker stop <RANCHER_CONTAINER_NAME>
|
||||
```
|
||||
You can obtain the name for your Rancher container by entering `docker ps`.
|
||||
|
||||
3. Go to the location where you saved your [backup tar balls]({{< baseurl>}}/rancher/v2.x/en/upgrades/single-node-upgrade/#backup). Run the following command to create a data container from the backup tar ball.
|
||||
1. Make sure you're in your home directory (`cd ~`). Enter `dir` to make sure the tarball you created during [Step 4](({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#tarball)) while following [Single Node Upgrade]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/) is available.
|
||||
|
||||
It will have a name similar to (`rancher-data-backup-<RANCHER_VERSION>`).
|
||||
|
||||
1. Run the following command to create a data container from the backup tarball. Don't forget to close the quotes.
|
||||
|
||||
```
|
||||
docker run --volumes-from rancher-data \
|
||||
-v $PWD:/backup alpine sh -c "rm /var/lib/rancher/* -rf \
|
||||
&& tar zxvf /backup/<BACKUP_FILENAME>.tar.gz"
|
||||
docker run --volumes-from rancher-data
|
||||
-v $PWD:/backup alpine sh -c "rm /var/lib/rancher/* -rf
|
||||
&& tar zxvf /backup/rancher-data-backup-<RANCHER_VERSION>"
|
||||
```
|
||||
|
||||
4. Start a new Rancher Server container with the `<PRIOR_VERSION>` tag pointing to the data container.
|
||||
1. Start a new Rancher Server container with the `<PRIOR_RANCHER_VERSION>` tag pointing to the data container.
|
||||
```
|
||||
docker run -d --volumes-from rancher-data \
|
||||
--restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:<PRIOR_VERSION>
|
||||
docker run -d --volumes-from rancher-data
|
||||
--restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:<PRIOR_RANCHER_VERSION>
|
||||
```
|
||||
>**Note:** _Do not_ stop the rollback after initiating it, even if the rollback process seems longer than expected. Stopping the rollback may result in database issues during future upgrades.
|
||||
|
||||
1. Wait a few moments and then open Rancher in a web browser. Confirm that the rollback succeeded and that your data is restored.
|
||||
|
||||
**Result:** Rancher is rolled back to its version and data state prior to upgrade.
|
||||
@@ -83,4 +83,4 @@ To upgrade Rancher Server 2.x when a new version is released, create a data back
|
||||
|
||||
**Result:** Rancher Server is upgraded to the latest version.
|
||||
|
||||
>**Note:** If your upgrade does not complete successfully, you can roll Rancher Server and its data back to its last healthy state. For more information, see [Restoring Backups—Single Node Installs]({{< baseurl >}}/rancher/v2.x/en/backups/restorations/single-node-restoration/).
|
||||
>**Note:** If your upgrade does not complete successfully, you can roll Rancher Server and its data back to its last healthy state. For more information, see [Single Node Rollback]({{< baseurl >}}/rancher/v2.x/en/upgrades/rollbacks/single-node-rollbacks/).
|
||||
|
||||
Reference in New Issue
Block a user