diff --git a/ee/dtr/admin/disaster-recovery/create-a-backup.md b/ee/dtr/admin/disaster-recovery/create-a-backup.md index ed26b99be3..f759e1d8a0 100644 --- a/ee/dtr/admin/disaster-recovery/create-a-backup.md +++ b/ee/dtr/admin/disaster-recovery/create-a-backup.md @@ -130,14 +130,15 @@ recommended for that system. ### Back up DTR metadata To create a DTR backup, load your UCP client bundle, and run the following -chained commands: +command. + +#### Chained commands (Linux only) {% raw %} ```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 ps --filter name=dtr-rethinkdb --format "{{ .Names }}" | head -1 | \ - sed 's|.*/||' | sed 's/dtr-rethinkdb-//'); \ +REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -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; \ @@ -168,7 +169,7 @@ flag with `--ucp-insecure-tls`. Docker does not recommend this flag for producti 5. Includes DTR version and timestamp to your `tar` backup file. You can learn more about the supported flags in -the [reference documentation](/reference/dtr/2.6/cli/backup.md). +the [DTR backup reference documentation](/reference/dtr/2.6/cli/backup.md). By default, the backup command does not pause the DTR replica being backed up to prevent interruptions of user access to DTR. Since the replica diff --git a/reference/dtr/2.6/cli/backup.md b/reference/dtr/2.6/cli/backup.md index 3c0e213dcb..17b2a5de76 100644 --- a/reference/dtr/2.6/cli/backup.md +++ b/reference/dtr/2.6/cli/backup.md @@ -26,12 +26,13 @@ docker run -i --rm --log-driver none docker/dtr:{{ page.dtr_version }} \ #### Advanced (with chained commands) +The following command has been tested on Linux: + {% raw %} ```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 ps --filter name=dtr-rethinkdb \ - --format "{{ .Names }}" | head -1 | sed 's|.*/||' | sed 's/dtr-rethinkdb-//'); \ +REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -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; \ @@ -47,7 +48,7 @@ docker run --log-driver none -i --rm \ {% endraw %} For a detailed explanation on the advanced example, see -[Back up your DTR metadata](ee/dtr/admin/disaster-recovery/create-a-backup/#back-up-dtr-metadata). +[Back up your DTR metadata](/ee/dtr/admin/disaster-recovery/create-a-backup/#back-up-dtr-metadata). To learn more about the `--log-driver` option for `docker run`, see [docker run reference](/engine/reference/run/#logging-drivers---log-driver). ## Description