Skip to content

Commit b2b56cb

Browse files
authored
DOCSP-23343 Improve Atlas Connection String Example (#272)
* DOCSP-23343 Improve Atlas Connection String Example * text edits * move note * MT feedback * test * tiny changes * * * fix staging
1 parent 7d576cf commit b2b56cb

File tree

4 files changed

+102
-4
lines changed

4 files changed

+102
-4
lines changed

source/connecting/atlas-to-atlas.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ Limitations
5353
Example
5454
-------
5555

56-
.. include:: /includes/example-connect
57-
56+
.. include:: /includes/example-connect-atlas.rst

source/connecting/onprem-to-atlas.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,4 @@ Limitations
6161
Example
6262
-------
6363

64-
.. include:: /includes/example-connect
65-
64+
.. include:: /includes/example-connect-onprem-atlas.rst
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Gather Connection Information
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The source cluster, ``cluster0``, is hosted on the following servers
5+
and ports:
6+
7+
- clusterOne-shard-00-00.abc12.mongodb.net:27017
8+
- clusterOne-shard-00-01.abc12.mongodb.net:27017
9+
- clusterOne-shard-00-02.abc12.mongodb.net:27017
10+
11+
The destination cluster, ``cluster1``, is hosted on the following
12+
servers and ports:
13+
14+
- clusterTwo-shard-00-00.abc12.mongodb.net:27017
15+
- clusterTwo-shard-00-01.abc12.mongodb.net:27017
16+
- clusterTwo-shard-00-02.abc12.mongodb.net:27017
17+
18+
There is an administrative user, ``clusterAdmin`` configured on each
19+
cluster with password, ``superSecret``.
20+
21+
Connect the Source and Destination Clusters with ``mongosync``
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+
Use the connection information you gathered to create the connection
25+
strings for ``cluster0`` and ``cluster1``:
26+
27+
.. code-block:: shell
28+
29+
cluster0:
30+
mongodb+srv://clusterAdmin:superSecret@clusterOne.abc12.mongodb.net
31+
cluster1:
32+
mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net
33+
34+
.. note::
35+
36+
Atlas clusters require TLS connections. To use ``mongosync`` with Atlas
37+
clusters, add the :urioption:`tls=true <tls>` option or use the
38+
``mongodb+srv`` connection string format. For more details about
39+
``mongodb+srv`` connection strings, see :ref:`connections-dns-seedlist`.
40+
41+
42+
The ``mongosync`` command layout below is modified for display. To
43+
connect ``cluster0`` to ``cluster1`` with ``mongosync``, enter the
44+
following command on one line:
45+
46+
.. code-block:: shell
47+
48+
mongosync \
49+
--cluster0 "mongodb+srv://clusterAdmin:superSecret@clusterOne.abc12.mongodb.net" \
50+
--cluster1 "mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Gather Connection Information
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The source cluster, ``cluster0``, is hosted on the following servers
5+
and ports:
6+
7+
- clusterOne01.fancyCorp.com:20020
8+
- clusterOne02.fancyCorp.com:20020
9+
- clusterOne03.fancyCorp.com:20020
10+
11+
The destination cluster, ``cluster1``, is hosted on the following
12+
servers and ports:
13+
14+
- clusterTwo-shard-00-00.abc12.mongodb.net:27017
15+
- clusterTwo-shard-00-01.abc12.mongodb.net:27017
16+
- clusterTwo-shard-00-02.abc12.mongodb.net:27017
17+
18+
There is an administrative user, ``clusterAdmin`` configured on each
19+
cluster with password, ``superSecret``.
20+
21+
Connect the Source and Destination Clusters with ``mongosync``
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+
Use the connection information you gathered to create the connection
25+
strings for ``cluster0`` and ``cluster1``:
26+
27+
.. code-block:: shell
28+
29+
cluster0:
30+
mongodb://clusterAdmin:superSecret@clusterOne01.fancyCorp.com:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020
31+
cluster1:
32+
mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net
33+
34+
.. note::
35+
36+
Atlas clusters require TLS connections. To use ``mongosync`` with Atlas
37+
clusters, add the :urioption:`tls=true <tls>` option or use the
38+
``mongodb+srv`` connection string format. For more details about
39+
``mongodb+srv`` connection strings, see :ref:`connections-dns-seedlist`.
40+
41+
The ``mongosync`` command layout below is modified for display. To
42+
connect ``cluster0`` to ``cluster1`` with ``mongosync``, enter the
43+
following command on one line:
44+
45+
.. code-block:: shell
46+
47+
mongosync \
48+
--cluster0 "mongodb://clusterAdmin:superSecret@clusterOne01.fancyCorp.com:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020" \
49+
--cluster1 "mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net"
50+

0 commit comments

Comments
 (0)