diff --git a/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md b/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md index 381a66bdff6..9392e349970 100644 --- a/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md +++ b/content/rancher/v2.x/en/backups/backups/single-node-backups/_index.md @@ -8,41 +8,44 @@ aliases: After completing your single node installation of Rancher, we recommend creating backups of it on a regular basis. Use these backups as a restoration point in a disaster scenario. - +## 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 (``). 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). + +Terminal `docker ps` Command and Rancher UI +![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png) + +| Legend | Placeholder | Example | Description | +| ------ | -------------------------- | -------------------------- | ----------------- | +| A | `` | `v2.0.5` | The rancher/rancher image you pulled for install.| +| B | `` | `festive_mestorf` | The name of your Rancher container.| +| C | `` | `v2.0.5` | The version of Rancher run in your container. | +
+ +- Obtain `` and `` by logging into your Rancher Server by remote connection and entering `docker ps`. + +- Obtain `` by logging into Rancher and viewing the bottom left of the browser window. + + +## Creating a Backup + +This procedure creates a backup that you can restore to in case Rancher encounters a disaster scenario. ->**Prerequisite:** Open Rancher and write down the version number displayed in the lower-left of the browser (example: `v2.0.5`). You'll need this number during the backup process. -> ->![Version Number]({{< baseurl >}}/img/rancher/rancher-version.png) 1. Using a remote Terminal connection, log into your Rancher Server. -1. Stop the container currently running Rancher Server. Replace `` with the name of your Rancher container. +1. Stop the container currently running Rancher Server. Replace `` with the [name of your Rancher container](#before-you-start). ``` docker stop ``` - You can obtain the name for your Rancher container by entering `docker ps`. - ![Stop Rancher Container]({{< baseurl >}}/img/rancher/docker-container-ps-output.png) - -1. Using the command below, create a data container from the Rancher container you just stopped. +1. Use the command below, replacing each [placeholder](#before-you-start), to create a data container from the Rancher container that you just stopped. ``` docker create --volumes-from --name rancher-data- rancher/rancher: ``` - Replace each of the command placeholders using help from the table below. - - - - Placeholder | Example | Description - ---------|----------|--------- - `` | `festive_mestorf` | The name of your [Rancher container](#placeholders). - `` | `v2.0.5` | The [version](#prereq) of Rancher run in your container. - `` | `v2.0.5` | The [rancher/rancher image](#placeholders) you pulled for install. -
- ![Backup Data Container]({{< baseurl >}}/img/rancher/backup-container.png) - -1. From the data container that you just created (`rancher-data-`), create a backup tarball (`rancher-data-backup-.tar.gz`). Use the following command, replacing each [placeholder](#ref-table). +1. From the data container that you just created (`rancher-data-`), create a backup tarball (`rancher-data-backup-.tar.gz`). Use the following command, replacing each [placeholder](#before-you-start). ``` docker run --volumes-from rancher-data- -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-.tar.gz /var/lib/rancher @@ -54,7 +57,7 @@ After completing your single node installation of Rancher, we recommend creating ![Backup Backup Tarball]({{< baseurl >}}/img/rancher/dir-backup-tarball.png) -1. Restart Rancher Server. Replace `` with the name of your [Rancher container](#placeholders). +1. Restart Rancher Server. Replace `` with the name of your [Rancher container](#before-you-start). ``` docker start diff --git a/content/rancher/v2.x/en/backups/restorations/single-node-restoration/_index.md b/content/rancher/v2.x/en/backups/restorations/single-node-restoration/_index.md index 5dfeb735333..bc6d8c34867 100644 --- a/content/rancher/v2.x/en/backups/restorations/single-node-restoration/_index.md +++ b/content/rancher/v2.x/en/backups/restorations/single-node-restoration/_index.md @@ -8,21 +8,45 @@ aliases: If you encounter a disaster scenario, you can restore your Rancher Server to your most recent backup. +## 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 (``). 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). + +Terminal `docker ps` Command and Rancher UI +![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png) + +| Legend | Placeholder | Example | Description | +| ------ | -------------------------- | -------------------------- | ----------------- | +| A | `` | `v2.0.5` | The rancher/rancher image you pulled for install.| +| B | `` | `festive_mestorf` | The name of your Rancher container.| +| C | `` | `v2.0.5` | The version of Rancher run in your container. | +
+ +- Obtain `` and `` by logging into your Rancher Server by remote connection and entering `docker ps`. + +- Obtain `` by logging into Rancher and viewing the bottom left of the browser window. + +## Restoring Backups + +Using a backup that you created earlier, restore Rancher to its last known healthy state. + 1. Using a remote Terminal connection, log into your Rancher Server. -1. Stop the container currently running Rancher Server. Replace `` with the name of your Rancher container. +1. Stop the container currently running Rancher Server. Replace `` with the [name of your Rancher container](#before-you-start). ``` docker stop ``` - You can obtain the name for your Rancher container by entering `docker ps`. - ![Stop Rancher Container]({{< baseurl >}}/img/rancher/docker-container-ps-output.png) +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/backups/backups/single-node-backups/#tarball) while following [Creating Backups—Single Node Installs]({{< baseurl >}}/rancher/v2.x/en/backups/backups/single-node-backups/) is available. -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/backups/backups/single-node-backups/#tarball)) while following [Creating Backups—Single Node Installs]({{< baseurl >}}/rancher/v2.x/en/backups/backups/single-node-backups/) is available. + It will have a name similar to `rancher-data-backup-`. - It will have a name similar to (`rancher-data-backup-`). + ![Backup Backup Tarball]({{< baseurl >}}/img/rancher/dir-backup-tarball-clear.png) -1. Enter the following command to delete your current state data and start your backup data. Don't forget to close the quotes. + +1. Enter the following command to delete your current state data and start your backup data, replacing the [placeholders](#before-you-start). Don't forget to close the quotes. + + >**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. ``` docker run --volumes-from -v $PWD:/backup @@ -30,9 +54,9 @@ If you encounter a disaster scenario, you can restore your Rancher Server to you tar zxvf /backup/rancher-data-backup-" ``` - >**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. + **Step Result:** A series of commands should run. -1. Restart your Rancher Server container. It will restart using your backup data. +1. Restart your Rancher Server container, replacing the [placeholder](#before-you-start). It will restart using your backup data. ``` docker start diff --git a/content/rancher/v2.x/en/upgrades/rollbacks/single-node-rollbacks/_index.md b/content/rancher/v2.x/en/upgrades/rollbacks/single-node-rollbacks/_index.md index cee066bacd9..afe819a2a61 100644 --- a/content/rancher/v2.x/en/upgrades/rollbacks/single-node-rollbacks/_index.md +++ b/content/rancher/v2.x/en/upgrades/rollbacks/single-node-rollbacks/_index.md @@ -6,18 +6,42 @@ 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/). +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/). + +## 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 (``). 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). + +Terminal `docker ps` Command and Rancher UI +![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png) + +| Legend | Placeholder | Example | Description | +| ------ | -------------------------- | -------------------------- | ----------------- | +| A | `` | `v2.0.5` | The rancher/rancher image you pulled for install.| +| B | `` | `festive_mestorf` | The name of your Rancher container.| +| C | `` | `v2.0.5` | The version of Rancher run in your container. | +
+ +- Obtain `` and `` by logging into your Rancher Server by remote connection and entering `docker ps`. + +- Obtain `` by logging into Rancher and viewing the bottom left of the browser window. + +## Rolling Back Rancher + +If you have issues upgrading Rancher, roll it back to its laster known healthy state by pulling the last version you used and then restoring the backup you made before upgrade. >**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 (which was the version that you wrote down for the [prereq]({{< baseurl >}}/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/#prereq). +1. Using a remote Terminal connection, log into your Rancher Server. + +1. Pull the version of Rancher that you were running prior to upgrade. Replace the `` with [that version](#before-you-start). + + For example, if you were running Rancher v2.0.5 before upgrade, pull v2.0.5. ``` docker pull rancher/rancher: ``` - For example, if you were running Rancher v2.0.5 before upgrade, pull v2.0.5. - + 1. Stop the container currently running Rancher Server. Replace `` with the name of your Rancher container. ``` @@ -29,15 +53,15 @@ restore the backup you created while completing [Single Node Upgrade]({{< baseur It will have a name similar to (`rancher-data-backup-`). -1. Run the following command to create a data container from the backup tarball. Don't forget to close the quotes. +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-" - ``` + ``` -1. Start a new Rancher Server container with the `` tag pointing to the data container. +1. Start a new Rancher Server container with the `` tag [placeholder](#before-you-start) pointing to the data container. ``` docker run -d --volumes-from rancher-data --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher: diff --git a/content/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/_index.md b/content/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/_index.md index 50b38cdad22..0b530fbf432 100644 --- a/content/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/_index.md +++ b/content/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/_index.md @@ -6,40 +6,53 @@ aliases: --- To upgrade Rancher Server 2.x when a new version is released, create a data backup for your current Rancher deployment, pull the latest image of Rancher, and then start a new Rancher container using your data backup. - +## Before You Start ->**Prerequisite:** Open Rancher and write down the version number displayed in the lower-left of the browser (example: `v2.0.5`). You'll need this number during the backup process. -> ->![Version Number]({{< baseurl >}}/img/rancher/rancher-version.png) +During upgrade, you'll enter a series of commands, filling placeholders with data from your environment. These placeholders are denoted with angled brackets (``). 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). + +Terminal `docker ps` Command and Rancher UI +![Placeholder Reference]({{< baseurl >}}/img/rancher/placeholder-ref.png) + +| Legend | Placeholder | Example | Description | +| ------ | -------------------------- | -------------------------- | ----------------- | +| A | `` | `v2.0.5` | The rancher/rancher image you pulled for install.| +| B | `` | `festive_mestorf` | The name of your Rancher container.| +| C | `` | `v2.0.5` | The version of Rancher run in your container. | +
+ +- Obtain `` and `` by logging into your Rancher Server by remote connection and entering `docker ps`. + +- Obtain `` by logging into Rancher and viewing the bottom left of the browser window. + +## Completing the Upgrade 1. Using a remote Terminal connection, log into your Rancher Server. -1. Stop the container currently running Rancher Server. Replace `` with the name of your Rancher container. + +1. Stop the container currently running Rancher Server. Replace `` with the [name of your Rancher container](#before-you-start). ``` docker stop ``` - You can obtain the name for your Rancher container by entering `docker ps`. - ![Stop Rancher Container]({{< baseurl >}}/img/rancher/docker-container-ps-output.png) -1. Using the command below, create a data container from the Rancher container you just stopped. +1. Use the command below, replacing each [placeholder](#before-you-start), to create a data container from the Rancher container that you just stopped. - - Replace `` with the name from the previous step (our example uses `festive_mestorf`). - - Replace `` with tag of your Rancher image (`v2.0.5` in our example). - - ``` + ``` docker create --volumes-from --name rancher-data rancher/rancher: ``` 1. From the data container that you just created (`rancher-data`), create an upgrade tarball (`rancher-data-backup-.tar.gz`). - This tarball will serve as a rollback point if something goes wrong during upgrade. + This tarball will serve as a rollback point if something goes wrong during upgrade. Use the following command, replacing each [placeholder](#before-you-start). + ``` docker run --volumes-from rancher-data -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-.tar.gz /var/lib/rancher ``` -1. Enter the `dir` command to confirm that the backup tarball was created. +1. Enter the `dir` command to confirm that the backup tarball was created. It will have a name similar to `rancher-data-backup-`. + + ![Backup Backup Tarball]({{< baseurl >}}/img/rancher/dir-backup-tarball.png) 1. Pull the most recent image of Rancher. @@ -77,6 +90,8 @@ To upgrade Rancher Server 2.x when a new version is released, create a data back 1. Log into Rancher. Confirm that the upgrade succeeded by checking the version displayed in the bottom-left corner of the browser window. + + 1. Remove the previous Rancher Server container. If you only stop the previous Rancher Server container (and don't remove it), the container may restart after the next server reboot. diff --git a/src/img/rancher/dir-backup-tarball-clear.png b/src/img/rancher/dir-backup-tarball-clear.png new file mode 100644 index 00000000000..35395285fdf Binary files /dev/null and b/src/img/rancher/dir-backup-tarball-clear.png differ diff --git a/src/img/rancher/placeholder-ref.png b/src/img/rancher/placeholder-ref.png new file mode 100644 index 00000000000..a5f45021c7f Binary files /dev/null and b/src/img/rancher/placeholder-ref.png differ