updating restore proc

This commit is contained in:
Mark Bishop
2018-08-24 23:32:33 -07:00
committed by Denise Schannon
parent 7cab5c74d0
commit c2bf284e50
2 changed files with 23 additions and 10 deletions

View File

@@ -40,6 +40,9 @@ After completing your single node installation of Rancher, we recommend creating
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
```
1. Enter the `dir` command to confirm that the backup tarball was created.
1. Restart Rancher Server. Replace `<RANCHER_CONTAINER_NAME>` with the name of your Rancher container.
```

View File

@@ -6,26 +6,36 @@ aliases:
- /rancher/v2.x/en/installation/after-installation/single-node-backup-and-restoration/
---
Restoring to a backup for your Rancher install if you encounter issues in your Rancher setup.
If you encounter a disaster scenario, you can restore your Rancher Server to your most recent backup.
1. Stop the container currently running Rancher Server. Replace `<RANCHER_CONTAINER_ID>` 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 `<RANCHER_CONTAINER_NAME>` with the name of your Rancher container.
```
docker stop <RANCHER_CONTAINER_ID>
docker stop <RANCHER_CONTAINER_NAME>
```
You can obtain the name for your Rancher container by entering `docker ps`.
![Stop Rancher Container]({{< baseurl >}}/img/rancher/docker-container-ps-output.png)
2. Go to the location where you saved your [backup tar balls]({{< baseurl >}}/rancher/v2.x/en/backups/backups/single-node-backups/#backup). Run the following command to delete your current state data and start your backup data:
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-<RANCHER_VERSION>`).
1. Enter the following command to delete your current state data and start your backup data. Don't forget to close the quotes.
```
docker run --volumes-from <RANCHER_CONTAINER_ID> -v $PWD:/backup \
alpine sh -c "rm /var/lib/rancher/* -rf && \
tar zxvf /backup/<BACKUP_FILENAME>.tar.gz"
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>"
```
>**Warning!** Running this command will delete ALL current state data from your Rancher Server container. Any changes that happened after the backup point you are restoring will be lost.
>**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.
3. Start you rancher server container back. The container will start with the data from the restored backup.
1. Restart your Rancher Server container. It will restart using your backup tarball.
```
docker start <RANCHER_CONTAINER_ID>
docker start <RANCHER_CONTAINER_NAME>
```
1. Wait a few moments and then open Rancher in a web browser. Confirm that the rollback succeeded and that your data is restored.