Skip to content

Commit

Permalink
Add flag to ucp 2.0 restore instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Fernandes committed Jan 5, 2017
1 parent 5a70ee3 commit 53f24f7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 53f24f7

Please sign in to comment.