draft for single node install upgrade rollback backup redo

This commit is contained in:
Mark Bishop
2018-08-28 14:44:38 -07:00
committed by Denise Schannon
parent 48ff75a99d
commit 377ac36ca3
4 changed files with 54 additions and 15 deletions
@@ -10,14 +10,22 @@ After completing your single node installation of Rancher, we recommend creating
## Before You Start
During backup creation, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets (`<example>`). Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#creating-a-backup).
During creation of your backup, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets and all capital letters (`<EXAMPLE>`). Here's an example of a command with a placeholder:
<sup>Terminal `docker ps` Command and Rancher UI</sup>
```
docker run --volumes-from rancher-data-<RANCHER_VERSION> -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-<RANCHER_VERSION>.tar.gz /var/lib/rancher
```
In this command, `<RANCHER_VERSION>` is a placeholder for the version of Rancher running in your environment. `v2.0.5` for example.
Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#creating-a-backup).
<sup>Terminal `docker ps` Command and Rancher UI, Displaying Where to Find Placeholders</sup>
![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png)
| Legend | Placeholder | Example | Description |
| ------ | -------------------------- | -------------------------- | ----------------- |
| A | `<RANCHER_CONTAINER_TAG>` | `v2.0.5` | The rancher/rancher image you pulled for install.|
| A | `<RANCHER_CONTAINER_TAG>` | `v2.0.5` | The rancher/rancher image you pulled for initial install.|
| B | `<RANCHER_CONTAINER_NAME>` | `festive_mestorf` | The name of your Rancher container.|
| C | `<RANCHER_VERSION>` | `v2.0.5` | The version of Rancher run in your container. |
<br/>
@@ -37,7 +45,7 @@ This procedure creates a backup that you can restore to in case Rancher encounte
1. Stop the container currently running Rancher Server. Replace `<RANCHER_CONTAINER_NAME>` with the [name of your Rancher container](#before-you-start).
```
docker stop <RANCHER_CONTAINER_NAME>
docker stop <RANCHER_CONTAINER_NAME>x
```
1. <a id="backup"></a>Use the command below, replacing each [placeholder](#before-you-start), to create a data container from the Rancher container that you just stopped.
@@ -10,9 +10,19 @@ If you encounter a disaster scenario, you can restore your Rancher Server to you
## Before You Start
During backup restoration, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets (`<example>`). Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#restoring-backups).
During restoration of your backup, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets and all capital letters (`<EXAMPLE>`). Here's an example of a command with a placeholder:
<sup>Terminal `docker ps` Command and Rancher UI</sup>
```
docker run --volumes-from <RANCHER_CONTAINER_NAME> -v $PWD:/backup
alpine sh -c "rm /var/lib/rancher/* -rf &&
tar zxvf /backup/rancher-data-backup-<RANCHER_VERSION>"
```
In this command, `<RANCHER_CONTAINER_NAME>` and `<RANCHER_VERSION>` are environment variables for your Rancher deployment.
Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#restoring-backups).
<sup>Terminal `docker ps` Command and Rancher UI, Displaying Where to Find Placeholders</sup>
![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png)
| Legend | Placeholder | Example | Description |
@@ -51,7 +61,7 @@ Using a backup that you created earlier, restore Rancher to its last known healt
```
docker run --volumes-from <RANCHER_CONTAINER_NAME> -v $PWD:/backup
alpine sh -c "rm /var/lib/rancher/* -rf &&
tar zxvf /backup/rancher-data-backup-<RANCHER_VERSION>"
tar zxvf /backup/rancher-data-backup-<RANCHER_VERSION>.tar.gz"
```
**Step Result:** A series of commands should run.
@@ -6,18 +6,26 @@ aliases:
- /rancher/v2.x/en/upgrades/single-node-rollbacks
---
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/).
If a Rancher upgrade does not complete successfully, you'll have to roll back to the backup you created during [Single Node Upgrade]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrade-scenarios/single-node-upgrade/). This rollback restores both your previous version of Rancher and your data.
## Before You Start
During backup creation, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets (`<example>`). Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#creating-a-backup).
During rollback to a prior version of Rancher, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets and all capital letters (`<EXAMPLE>`). Here's an example of a command with a placeholder:
<sup>Terminal `docker ps` Command and Rancher UI</sup>
```
docker pull rancher/rancher:<PRIOR_RANCHER_VERSION>
```
In this command, `<PRIOR_RANCHER_VERSION>` is the version of Rancher you were running before your unsuccessful upgrade. `v2.0.5` for example.
Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#creating-a-backup).
<sup>Terminal `docker ps` Command and Rancher UI, Displaying Where to Find Placeholders</sup>
![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png)
| Legend | Placeholder | Example | Description |
| ------ | -------------------------- | -------------------------- | ----------------- |
| A | `<PRIOR_RANCHER_VERSION>` | `v2.0.5` | The rancher/rancher image you pulled for install.|
| A | `<PRIOR_RANCHER_VERSION>` | `v2.0.5` | The rancher/rancher image you used before upgrade.|
| B | `<RANCHER_CONTAINER_NAME>` | `festive_mestorf` | The name of your Rancher container.|
| C | `<RANCHER_VERSION>` | `v2.0.5` | The version of Rancher run in your container. |
<br/>
@@ -51,14 +59,14 @@ If you have issues upgrading Rancher, roll it back to its laster known healthy s
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>`).
It will have a name similar to (`rancher-data-backup-<RANCHER_VERSION>.tar.gz`).
1. Run the following command to create a data container from the backup tarball, replacing the [placeholder](#before-you-start) 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/rancher-data-backup-<RANCHER_VERSION>"
&& tar zxvf /backup/rancher-data-backup-<RANCHER_VERSION>.tar.gz"
```
1. Start a new Rancher Server container with the `<PRIOR_RANCHER_VERSION>` tag [placeholder](#before-you-start) pointing to the data container.
@@ -8,9 +8,18 @@ To upgrade Rancher Server 2.x when a new version is released, create a data back
## Before You Start
During upgrade, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets (`<example>`). Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#completing-the-upgrade).
During upgrade, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets and all capital letters (`<EXAMPLE>`). Here's an example of a command with a placeholder:
<sup>Terminal `docker ps` Command and Rancher UI</sup>
```
docker run --volumes-from rancher-data -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-<RANCHER_VERSION>.tar.gz /var/lib/rancher
```
In this command, `<RANCHER_VERSION>` is the version of Rancher running in your Rancher deployment before upgrade.
Cross reference the image and reference table below to learn how to obtain this placeholder data. Write down or copy this information before starting the [procedure below](#completing-the-upgrade).
<<sup>Terminal `docker ps` Command and Rancher UI, Displaying Where to Find Placeholders</sup>
![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png)
| Legend | Placeholder | Example | Description |
@@ -26,6 +35,8 @@ During upgrade, you'll enter a series of commands, filling placeholders with dat
## Completing the Upgrade
During upgrade, you create a copy of the data from your current Rancher container and a backup in case something goes wrong. Then you deploy the new version of Rancher in a new container using your existing data.
1. Using a remote Terminal connection, log into your Rancher Server.
@@ -50,6 +61,8 @@ During upgrade, you'll enter a series of commands, filling placeholders with dat
docker run --volumes-from rancher-data -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-<RANCHER_VERSION>.tar.gz /var/lib/rancher
```
When you enter this command, a series of commands should run.
1. Enter the `dir` command to confirm that the backup tarball was created. It will have a name similar to `rancher-data-backup-<RANCHER_VERSION>`.
![Backup Backup Tarball]({{< baseurl >}}/img/rancher/dir-backup-tarball.png)