|
| 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 | +- clusterTwo01.fancyCorp.com: 20020 |
| 15 | +- clusterTwo02.fancyCorp.com: 20020 |
| 16 | +- clusterTwo03.fancyCorp.com: 20020 |
| 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 | +The generic connection string format is: |
| 25 | + |
| 26 | +.. code-block:: shell |
| 27 | +
|
| 28 | + mongodb://<user>:<password>@<ip-address>:<port>,<ip-address>:<port>,<ip-address>:<port> |
| 29 | +
|
| 30 | +Use the connection information you gathered to create the connection |
| 31 | +strings for ``cluster0`` and ``cluster1``: |
| 32 | + |
| 33 | +.. code-block:: shell |
| 34 | + :copyable: false |
| 35 | +
|
| 36 | + cluster0: |
| 37 | + mongodb://clusterAdmin:[email protected]:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020 |
| 38 | + cluster1: |
| 39 | + mongodb://clusterAdmin:[email protected]:20020,clusterTwo02.fancyCorp.com:20020,clusterTwo03.fancyCorp.com:20020 |
| 40 | +
|
| 41 | +The ``mongosync`` command layout below is modified for display. To |
| 42 | +connect ''cluster0`` to ``cluster`` with ``mongosync``, enter the |
| 43 | +following command on one line: |
| 44 | + |
| 45 | +.. code-block:: shell |
| 46 | + :copyable: false |
| 47 | +
|
| 48 | + mongosync --cluster0 mongodb://clusterAdmin:[email protected]:20020, |
| 49 | + clusterOne02.fancyCorp.com:20020, |
| 50 | + clusterOne03.fancyCorp.com:20020 |
| 51 | + --cluster1 mongodb://clusterAdmin:[email protected]:20020, |
| 52 | + clusterTwo02.fancyCorp.com:20020, |
| 53 | + clusterTwo03.fancyCorp.com:20020 |
| 54 | +
|
0 commit comments