From 7a3a12b688d7a48d59d15015c96cfb35c1c47042 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Sat, 25 Aug 2018 13:53:55 -0700 Subject: [PATCH] content complete --- .../single-node-restoration/_index.md | 2 +- .../rollbacks/single-node-rollbacks/_index.md | 32 ++++++++++++------- .../upgrades/single-node-upgrade/_index.md | 2 +- 3 files changed, 23 insertions(+), 13 deletions(-) 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 6efe0a1c4b5..5dfeb735333 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 @@ -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 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 08bac2e9107..cee066bacd9 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 @@ -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: + docker pull rancher/rancher: ``` + 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 `` with the ID of your Rancher container. +1. Stop the container currently running Rancher Server. Replace `` with the name of your Rancher container. ``` -docker stop + docker stop ``` + 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-`). + +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/.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-" ``` -4. Start a new Rancher Server container with the `` tag pointing to the data container. +1. Start a new Rancher Server container with the `` tag pointing to the data container. ``` -docker run -d --volumes-from rancher-data \ - --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher: + docker run -d --volumes-from rancher-data + --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher: ``` >**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. \ No newline at end of file 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 353ed70b740..50b38cdad22 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 @@ -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/).