Update backup/restore/rollback procedure

This commit is contained in:
moelsayed
2018-07-26 11:36:50 -07:00
committed by Denise
parent 20bd1171a7
commit f8c43f90e5
3 changed files with 41 additions and 23 deletions
@@ -3,10 +3,8 @@ title: Rolling Back—Single Node Installs
weight: 25
---
Rolling back an unsuccessful Rancher upgrade requires you to run the upgrade command again, with a couple of modifications:
- Run the upgrade command using the server tag for your prior Rancher install.
- Run the upgrade command while pointing toward the backup container you created while completing [Single Node Upgrade]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrade-scenarios/single-node-upgrade/).
Rolling back an unsuccessful Rancher upgrade requires you to
restore the backup you created while completing [Single Node Upgrade]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrade-scenarios/single-node-upgrade/).
>**Warning!** Rolling back to a previous version of Rancher destroys any changes made to Rancher following the upgrade. Unrecoverable data loss may occur.
@@ -16,12 +14,21 @@ Rolling back an unsuccessful Rancher upgrade requires you to run the upgrade com
docker pull rancher/rancher:<PRIOR_VERSION>
```
1. Launch a Rancher Server container that you created while completing [Step 3 of Single Node Upgrade]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrade-scenarios/single-node-upgrade/#backup).
Replace the `<PRIOR_VERSION>` placeholders with the version number of Rancher that you're rolling back to before upgrade.
2. Stop the container currently running Rancher Server. Replace `<RANCHER_CONTAINER_ID>` with the ID of your Rancher container.
```bash
docker stop <RANCHER_CONTAINER_ID>
```
docker run -d --volumes-from rancher-data-snapshot-<PRIOR_VERSION> --restart=unless-stopped \
3. Go to the location where you saved your backup tar balls. And run the following command.
```bash
docker run --volumes-from rancher-data-<PRIOR_VERSION> -v $PWD:/backup alpine sh -c "rm /var/lib/rancher/* -rf && tar zxvf /backup/<BACKUP_FILENAME>.tar.gz"
```
4. Start a new Rancher Server container with the `<PRIOR_VERSION>` tag.
```
docker run -d --volumes-from rancher-data-<PRIOR_VERSION> --restart=unless-stopped \
-p 80:80 -p 443:443 rancher/rancher:<PRIOR_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.
>**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.