Skip to content

Commit a230d12

Browse files
jason-price-mongodbjason-price-mongodb
and
jason-price-mongodb
authored
DOCSP-29504-many-to-one-clusters (#161)
* DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters * DOCSP-29504-many-to-one-clusters --------- Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
1 parent a79219c commit a230d12

9 files changed

+122
-2
lines changed

Diff for: source/includes/many-with-one-cluster.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Starting in ``mongosync-beta`` 1.8, you can sync multiple source clusters
2+
simultaneously with a destination cluster. For example, you can
3+
consolidate data from many small clusters into a central cluster.

Diff for: source/includes/migrationName-description.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Starting in ``mongosync-beta`` 1.8, you can set a migration name for a
2+
sync operation. For example, you can set a migration name to identify
3+
each sync operation from multiple source clusters into a destination
4+
cluster.

Diff for: source/includes/opts/migrationName.rst

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. reference/configuration.txt
2+
.. reference/mongosync.txt
3+
4+
Starting in ``mongosync-beta`` 1.8, sets a migration name for a sync
5+
operation. For example, you can set a migration name to identify each
6+
sync operation from multiple source clusters into one destination
7+
cluster.
8+
9+
The ``migrationName`` string can contain up to 44 alphanumeric
10+
and underscore characters. ``migrationName`` is appended to the string
11+
``"mongosync_internal_"`` to set the migration metadata database name.
12+
13+
If you set ``migrationName`` to
14+
``"cluster_27000_to_cluster_35000_sync"``, the resulting ``mongosync``
15+
metadata database name is
16+
``"mongosync_internal_cluster_27000_to_cluster_35000_sync"``.
17+
18+
For a complete example, see :ref:`c2c-quickstart-many-with-one`.

Diff for: source/index.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Cluster-to-Cluster Sync
99
.. default-domain:: mongodb
1010

1111
{+c2c-product-name+} provides continuous data synchronization or a
12-
one-time data migration between two MongoDB clusters. You can enable
12+
one-time data migration between MongoDB clusters. You can enable
1313
{+c2c-product-name+} with the :ref:`mongosync <c2c-mongosync>` utility.
1414

1515
``mongosync`` can continuously synchronize data between two clusters.

Diff for: source/quickstart.txt

+34
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ Initialization Notes
195195
<c2c-api-start>` command. "cluster0" and "cluster1" are just labels,
196196
either cluster can be ``cluster0`` or ``cluster1``.
197197

198+
.. _c2c-quickstart-synchronize:
199+
198200
Synchronize Data Between Clusters
199201
---------------------------------
200202

@@ -305,3 +307,35 @@ Synchronization Notes
305307

306308
- To estimate the size of ``oplog`` needed for initial synchronization,
307309
see :ref:`c2c-oplog-sizing`.
310+
311+
.. _c2c-quickstart-many-with-one:
312+
313+
Sync Multiple Source Clusters Simultaneously with a Destination Cluster
314+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315+
316+
.. include:: /includes/many-with-one-cluster.rst
317+
318+
For limitations, see :ref:`c2c-limitations_multiple_sync`.
319+
320+
The following examples connect source clusters running on port ``27000``
321+
and ``27001`` with a destination cluster running on port ``35000``. The
322+
commands also set the optional :option:`--migrationName` string to
323+
describe the operations.
324+
325+
.. code-block:: shell
326+
327+
./bin/mongosync \
328+
--cluster0 "mongodb://localhost:27000" \
329+
--cluster1 "mongodb://localhost:35000" \
330+
--migrationName "cluster_27000_to_cluster_35000_sync"
331+
332+
./bin/mongosync \
333+
--cluster0 "mongodb://localhost:27001" \
334+
--cluster1 "mongodb://localhost:35000" \
335+
--migrationName "cluster_27001_to_cluster_35000_sync"
336+
337+
.. include:: /includes/many-with-one-cluster.rst
338+
339+
To start the sync operation between the source clusters and the
340+
destination cluster, see the earlier section
341+
:ref:`c2c-quickstart-synchronize`.

Diff for: source/reference/configuration.txt

+9
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ Options
111111
To set the ``logPath`` setting from the command line, see the
112112
:option:`--logPath` option.
113113

114+
.. setting:: migrationName
115+
116+
*Type*: string
117+
118+
.. include:: /includes/opts/migrationName.rst
119+
120+
To set the ``migrationName`` setting from the command line, see the
121+
:option:`--migrationName` option.
122+
114123
.. setting:: port
115124

116125
*Type*: integer

Diff for: source/reference/limitations.txt

+31
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,37 @@ General Limitations
5555
- ``mongosync`` must read from the source cluster using the
5656
:readmode:`primary` read preference.
5757

58+
.. _c2c-limitations_multiple_sync:
59+
60+
Multiple Source Sync Limitations
61+
--------------------------------
62+
63+
.. include:: /includes/many-with-one-cluster.rst
64+
65+
A namespace is a ``database_name.collection_name`` combination. You can
66+
only sync namespaces that don't conflict.
67+
68+
For example, consider this scenario:
69+
70+
- Two source clusters S1 and S2.
71+
- A destination cluster D.
72+
- Databases named ``inventory`` and ``sales`` on both S1 and S2.
73+
- Collections named ``products``, ``orderLines``, ``orderStatus``, and
74+
``orders`` on both S1 and S2.
75+
- You can sync both of these combinations:
76+
77+
- ``inventory.products`` and ``sales.orderStatus`` on S1 with D.
78+
- ``inventory.orderLines`` and ``sales.orders`` on S2 with D.
79+
80+
- You cannot sync both of these combinations because they conflict:
81+
82+
- ``inventory.products`` and ``inventory.orderLines`` on S1 with D. If
83+
D is initially empty, you can sync S1 with D. ``inventory.products``
84+
and ``inventory.orderLines`` are copied from S1 to D.
85+
- ``inventory.products`` and ``inventory.orderLines`` on S2 with D.
86+
You cannot sync S2 with D because ``inventory.products`` and
87+
``inventory.orderLines`` conflict with the namespaces already on D
88+
from the scenario in the previous point.
5889

5990
MongoDB Community Edition
6091
-------------------------

Diff for: source/reference/mongosync.txt

+7
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ Global Options
119119
.. note::
120120

121121
.. include:: /includes/fact-log-rotation-usr1-signal
122+
123+
.. option:: --migrationName <name>
124+
125+
.. include:: /includes/opts/migrationName.rst
126+
127+
To set the ``--migrationName`` option from a configuration file,
128+
see the :setting:`migrationName` setting.
122129

123130
.. option:: --port
124131

Diff for: source/release-notes/1.8.txt

+15-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,22 @@ Release Notes for mongosync 1.8
2121

2222
**Upcoming**
2323

24-
New Features:
24+
Beta Features:
2525

26+
Synchronize Data Between Multiple Source Clusters Simultaneously
27+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28+
29+
.. include:: /includes/many-with-one-cluster.rst
30+
31+
Set a Migration Name
32+
~~~~~~~~~~~~~~~~~~~~
33+
34+
.. include:: /includes/migrationName-description.rst
35+
36+
To set a migration name, see:
37+
38+
- :setting:`migrationName` configuration file setting
39+
- :option:`--migrationName` command line option
2640

2741
Minimum Supported Version
2842
-------------------------

0 commit comments

Comments
 (0)