Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/connecting/atlas-to-atlas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ Limitations
Example
-------

.. include:: /includes/example-connect

.. include:: /includes/example-connect-atlas.rst
3 changes: 1 addition & 2 deletions source/connecting/onprem-to-atlas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ Limitations
Example
-------

.. include:: /includes/example-connect

.. include:: /includes/example-connect-onprem-atlas.rst
50 changes: 50 additions & 0 deletions source/includes/example-connect-atlas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Gather Connection Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The source cluster, ``cluster0``, is hosted on the following servers
and ports:

- clusterOne-shard-00-00.abc12.mongodb.net:27017
- clusterOne-shard-00-01.abc12.mongodb.net:27017
- clusterOne-shard-00-02.abc12.mongodb.net:27017

The destination cluster, ``cluster1``, is hosted on the following
servers and ports:

- clusterTwo-shard-00-00.abc12.mongodb.net:27017
- clusterTwo-shard-00-01.abc12.mongodb.net:27017
- clusterTwo-shard-00-02.abc12.mongodb.net:27017

There is an administrative user, ``clusterAdmin`` configured on each
cluster with password, ``superSecret``.

Connect the Source and Destination Clusters with ``mongosync``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the connection information you gathered to create the connection
strings for ``cluster0`` and ``cluster1``:

.. code-block:: shell

cluster0:
mongodb+srv://clusterAdmin:superSecret@clusterOne.abc12.mongodb.net
cluster1:
mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net

.. note::

Atlas clusters require TLS connections. To use ``mongosync`` with Atlas
clusters, add the :urioption:`tls=true <tls>` option or use the
``mongodb+srv`` connection string format. For more details about
``mongodb+srv`` connection strings, see :ref:`connections-dns-seedlist`.


The ``mongosync`` command layout below is modified for display. To
connect ``cluster0`` to ``cluster1`` with ``mongosync``, enter the
following command on one line:

.. code-block:: shell

mongosync \
--cluster0 "mongodb+srv://clusterAdmin:superSecret@clusterOne.abc12.mongodb.net" \
--cluster1 "mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net"
50 changes: 50 additions & 0 deletions source/includes/example-connect-onprem-atlas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Gather Connection Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The source cluster, ``cluster0``, is hosted on the following servers
and ports:

- clusterOne01.fancyCorp.com:20020
- clusterOne02.fancyCorp.com:20020
- clusterOne03.fancyCorp.com:20020

The destination cluster, ``cluster1``, is hosted on the following
servers and ports:

- clusterTwo-shard-00-00.abc12.mongodb.net:27017
- clusterTwo-shard-00-01.abc12.mongodb.net:27017
- clusterTwo-shard-00-02.abc12.mongodb.net:27017

There is an administrative user, ``clusterAdmin`` configured on each
cluster with password, ``superSecret``.

Connect the Source and Destination Clusters with ``mongosync``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the connection information you gathered to create the connection
strings for ``cluster0`` and ``cluster1``:

.. code-block:: shell

cluster0:
mongodb://clusterAdmin:superSecret@clusterOne01.fancyCorp.com:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020
cluster1:
mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net

.. note::

Atlas clusters require TLS connections. To use ``mongosync`` with Atlas
clusters, add the :urioption:`tls=true <tls>` option or use the
``mongodb+srv`` connection string format. For more details about
``mongodb+srv`` connection strings, see :ref:`connections-dns-seedlist`.

The ``mongosync`` command layout below is modified for display. To
connect ``cluster0`` to ``cluster1`` with ``mongosync``, enter the
following command on one line:

.. code-block:: shell

mongosync \
--cluster0 "mongodb://clusterAdmin:superSecret@clusterOne01.fancyCorp.com:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020" \
--cluster1 "mongodb+srv://clusterAdmin:superSecret@clusterTwo.abc12.mongodb.net"