Fixed syntax error (#8732)

* Fixed syntax error

Last edit to the REPLICA_ID command introduced a syntax error by adding an extra ')'. Removed it.

* Fix replica ID setting examples

- Accept suggestion from @thajeztah based on product testing
- Apply change to page examples
- Remove NFS backup example based on the following errors: 
tar: /var/lib/docker/volumes/dtr-registry-nfs-36e6bf87816d: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
This commit is contained in:
Nathan Jones 2019-05-06 23:42:27 -04:00 committed by Maria Bermudez
parent 1de4d5aff7
commit bea1794766
1 changed files with 4 additions and 13 deletions

View File

@ -78,11 +78,11 @@ docker ps --format "{{.Names}}" | grep dtr
##### SSH access
Another way to determine the replica ID is to SSH into a DTR node and run the following:
Another way to determine the replica ID is to log into a DTR node using SSH and run the following:
{% raw %}
```bash
REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')
REPLICA_ID=$(docker ps --format '{{.Names}}' -f name=dtr-rethink | cut -f 3 -d '-')
&& echo $REPLICA_ID
```
{% endraw %}
@ -103,16 +103,7 @@ and creating a `tar` archive of the [dtr-registry volume](../../architecture.md)
{% raw %}
```none
sudo tar -cf dtr-image-backup-$(date +%Y%m%d-%H_%M_%S).tar \
/var/lib/docker/volumes/dtr-registry-$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')
```
{% endraw %}
##### NFS-mounted images
{% raw %}
```none
sudo tar -cf dtr-image-backup-$(date +%Y%m%d-%H_%M_%S).tar \
/var/lib/docker/volumes/dtr-registry-nfs-$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')
/var/lib/docker/volumes/dtr-registry-$(docker ps --format '{{.Names}}' -f name=dtr-rethink | cut -f 3 -d '-')
```
{% endraw %}
@ -136,7 +127,7 @@ command.
```none
DTR_VERSION=$(docker container inspect $(docker container ps -f name=dtr-registry -q) | \
grep -m1 -Po '(?<=DTR_VERSION=)\d.\d.\d'); \
REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')); \
REPLICA_ID=$(docker ps --format '{{.Names}}' -f name=dtr-rethink | cut -f 3 -d '-'); \
read -p 'ucp-url (The UCP URL including domain and port): ' UCP_URL; \
read -p 'ucp-username (The UCP administrator username): ' UCP_ADMIN; \
read -sp 'ucp password: ' UCP_PASSWORD; \