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 d9bfad5f390..10d6b1e9747 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 @@ -34,7 +34,7 @@ After completing your single node installation of Rancher, we recommend creating docker create --volumes-from --name rancher-data- rancher/rancher: ``` -1. From the data container that you just created (`rancher-data-`), create a backup tarball (`rancher-data-backup-.tar.gz`). +1. From the data container that you just created (`rancher-data-`), create a backup tarball (`rancher-data-backup-.tar.gz`). ``` docker run --volumes-from rancher-data- -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-.tar.gz /var/lib/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 80d9f0c4db2..353ed70b740 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 @@ -4,43 +4,47 @@ weight: 1010 aliases: - /rancher/v2.x/en/upgrades/single-node-upgrade/ --- -To upgrade Rancher Server 2.x after a new version is released, create a backup of your server and then run the upgrade command. +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. + ->**Prerequisites:** Open Rancher and write down the version number displayed in the lower-left of the browser (example: `v2.0.0`). You'll need this number during the upgrade process. +>**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. Stop the container currently running Rancher Server. Replace `` with the ID of your Rancher container. +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. ``` -docker stop + 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. + + - 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: ``` - >**Tip:** You can obtain the ID for your Rancher container by entering the following command: `docker ps`. +1. From the data container that you just created (`rancher-data`), create an upgrade tarball (`rancher-data-backup-.tar.gz`). -1. Create a container of your current Rancher data for use in your upgraded Rancher Server. Name the container `rancher-data`. - - - Replace `` with the same ID from the previous step. - - Replace `` with the version of Rancher that you are currently running, as mentioned in the **Prerequisite** above. + This tarball will serve as a rollback point if something goes wrong during upgrade. ``` -docker create --volumes-from \ ---name rancher-data rancher/rancher: + docker run --volumes-from rancher-data -v $PWD:/backup alpine tar zcvf /backup/rancher-data-backup-.tar.gz /var/lib/rancher ``` -1. Create a backup tar ball of your current Rancher data. If you need to rollback, use this backup tar ball. - - - Replace `` with the tag for the version of Rancher currently installed. - - ``` -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. Pull the most recent image of Rancher. ``` -docker pull rancher/rancher:latest + docker pull rancher/rancher:latest ``` >**Attention Air Gap Users:** @@ -52,8 +56,7 @@ docker pull rancher/rancher:latest 1. Launch a new Rancher Server container using the `rancher-data` container. ``` -docker run -d --volumes-from rancher-data --restart=unless-stopped \ --p 80:80 -p 443:443 rancher/rancher:latest + docker run -d --volumes-from rancher-data --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest ``` >**Want records of all transactions with the Rancher API?**