Add flag to ucp 2.0 restore instructions

This commit is contained in:
Joao Fernandes 2017-01-05 14:00:42 -08:00
parent 5a70ee3591
commit 53f24f763c
2 changed files with 19 additions and 16 deletions

View File

@ -62,12 +62,24 @@ Enter passphrase: secret
## Restore command
The example below shows how to restore a UCP controller node from an existing
backup:
backup.
```bash
First find out the Id of the UCP replica you want to restore:
```none
$ docker run --rm --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp id
```
Then, run the restore command:
```none
$ docker run --rm -i --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp restore < backup.tar
docker/ucp restore \
--passphrase "secret" \
--id <replica-id> < backup.tar
```
@ -91,4 +103,4 @@ You should now have your cluster up and running.
## Where to go next
* [Set up high availability](set-up-high-availability.md)
* [UCP architecture](../architecture.md)
* [UCP architecture](../architecture.md)

View File

@ -37,7 +37,7 @@ across multiple UCP controller nodes.
The example below shows how to create a backup of a UCP controller node:
```bash
```none
# Create a backup, encrypt it, and store it on /tmp/backup.tar
$ docker run --rm -i --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
@ -53,19 +53,10 @@ $ gpg --decrypt /tmp/backup.tar | tar --list
The example below shows how to restore a UCP controller node from an existing
backup:
```bash
```none
$ docker run --rm -i --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp restore < backup.tar
```
The restore command may also be invoked in interactive mode:
```bash
$ docker run --rm -i --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /path/to/backup.tar:/config/backup.tar \
docker/ucp restore -i
docker/ucp restore --passphrase "secret" < backup.tar
```
## Restore your cluster