Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 1fdd98e

Browse files
Merge branch 'master' into DOCSP-29501-time-series
2 parents a6fe567 + e060461 commit 1fdd98e

32 files changed

+715
-123
lines changed

config/redirects

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define: prefix docs/cluster-to-cluster-sync
22
define: base https://www.mongodb.com/docs/cluster-to-cluster-sync
3-
define: versions v0.9 master
3+
define: versions v0.9 v1.7 master
44

55
# raw: <source file> -> ${base}/<destination>
66

snooty.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,19 @@ toc_landing_pages = ["/quickstart",
1919
"/using-mongosync",
2020
"/multiple-mongosyncs",
2121
"/release-notes/release-notes",
22-
"/faq"
22+
"/faq",
23+
"/reference/collection-level-filtering"
2324
]
2425

2526
[constants]
26-
version = "1.0"
27+
version = "1.7"
28+
version-dev = "1.8"
2729
c2c-product-name = "Cluster-to-Cluster Sync"
2830
c2c-full-product-name = "MongoDB Cluster-to-Cluster Sync"
2931
mdb-download-center = "`MongoDB Download Center <https://www.mongodb.com/try/download/mongosync>`__"
3032

3133
[substitutions]
3234
c2c-product-name = "Cluster-to-Cluster Sync"
3335
version = "{+version+}"
36+
version-dev = "{+version-dev+}"
3437

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
Starting in 1.6, the :ref:`c2c-api-start` API now supports the use of
3+
Regular Expressions to configure filters for the ``includeNamespaces``
4+
and ``excludeNamespaces`` parameters used in :ref:`c2c-filtered-sync`.
5+
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
If you configure a filter on a source cluster that has multiple
3+
databases, ``mongosync`` only syncs the databases specified in
4+
the filter definition. ``mongosync`` will not sync the other
5+
existing databases.
6+
7+
If you want to modify the filter to add a newly created database,
8+
you have to :ref:`restart the filtered sync <c2c-change-filter>`
9+
from the beginning.
10+
11+
For more details, see :ref:`c2c-filtered-sync`.
12+
13+
For current limitations, see :ref:`c2c-filtering-limitations`.
14+

source/includes/api/requests/start-filtered.sh

+9-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ curl -X POST "http://localhost:27182/api/v1/start" --data '
22
{
33
"source": "cluster0",
44
"destination": "cluster1",
5-
"includeNamespaces" : [
5+
"includeNamespaces": [
66
{
7-
"database" : "sales",
8-
"collections": [ "EMEA", "APAC" ]
9-
},
10-
{
11-
"database" : "marketing"
7+
"database": "sales",
8+
"collectionRegex": {
9+
"pattern": "^accounts_.+$",
10+
"options": "i"
11+
}
12+
}, {
13+
"database": "marketing"
1214
}
1315
]
14-
} '
16+
} '

source/includes/collections/behavior-capped-collections.rst

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Starting in 1.3.0, {+c2c-product-name+} supports :ref:`capped
22
collections <manual-capped-collection>` with some limitations.
33

4-
- The minimum server version is 6.0.
54
- :dbcommand:`convertToCapped` is not supported. If you run
65
``convertToCapped``, ``mongosync`` exits with an error.
76
- :dbcommand:`cloneCollectionAsCapped` is not supported.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Starting in 1.7.0, ``mongosync`` can perform a cross version migration
2+
from a lower major version source cluster to a higher major version
3+
destination cluster. You can migrate up to two major versions ahead. For
4+
example, you can synchronize a cluster running MongoDB 6.0 with a
5+
cluster running 7.0.
6+
7+
Cross version migration requires additional preparation and
8+
configuration when migrating from a pre-6.0 release. To perform a cross
9+
version migration from a pre-6.0 version of the MongoDB Server using
10+
``mongosync``, please `contact <https://mongodb.com/contact>`__ your
11+
account team to inquire about Professional Services.

source/includes/example-filter-collection-with-renaming.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ databases.
1111
The ``includeNamespaces`` array in this example defines a filter on two
1212
of the databases:
1313

14-
.. code-block:: shell
14+
.. code-block:: json
1515
1616
{
1717
"source": "cluster0",
@@ -52,7 +52,7 @@ Renaming a Collection
5252

5353
You can rename any collection in the ``staff`` database.
5454

55-
.. code-block:: shell
55+
.. code-block:: javascript
5656
5757
// This code works
5858
use admin
@@ -62,7 +62,7 @@ You can only rename a collection within the ``students`` database if the
6262
new and old names are both in the filter. If either of the names is not
6363
in the filter, ``monogsync`` reports an error and exists.
6464

65-
.. code-block:: shell
65+
.. code-block:: javascript
6666
6767
// This code works
6868
use admin
@@ -71,7 +71,7 @@ in the filter, ``monogsync`` reports an error and exists.
7171
If a collection is specified in the filter, you can drop it, but you
7272
cannot rename it to remove it from the filter.
7373

74-
.. code-block:: shell
74+
.. code-block:: javascript
7575
:copyable: false
7676
7777
// This code produces an error and mongosync stops syncing
@@ -83,22 +83,22 @@ collections to add them to the filter:
8383

8484
- Source collection is specified in the filter
8585

86-
.. code-block:: shell
86+
.. code-block:: javascript
8787
8888
use admin
8989
db.runCommand( { renameCollection: "students.adjuncts", to: "staff.adjuncts" } )
9090
9191
- Source collection is not specified in the filter
9292

93-
.. code-block:: shell
93+
.. code-block:: javascript
9494
9595
use admin
9696
db.runCommand( { renameCollection: "prospects.current", to: "staff.newHires" } )
9797
9898
You can also rename collections in the source database when the whole
9999
target database is in the filter:
100100

101-
.. code-block:: shell
101+
.. code-block:: javascript
102102
103103
use admin
104104
db.runCommand( { renameCollection: "staff.employees", to: "staff.onPayroll" } )

source/includes/example-filter-collection.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ of the databases, ``sales`` and ``marketing``.
1212
The ``sales`` database also filters on the ``EMEA`` and ``APAC``
1313
collections.
1414

15-
.. code-block:: javascript
15+
.. code-block:: json
1616
1717
"includeNamespaces" : [
1818
{

source/includes/fact-minimum-versions.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Starting in version 1.2, ``mongosync`` can sync between clusters running
22
some older (pre-6.0) releases of MongoDB Server. This feature requires
33
additional preparation and configuration in pre-6.0 releases.
44

5-
If you would like to migrate pre-6.0 versions of MongoDB Server
6-
using ``mongosync``, please `contact <https://mongodb.com/contact>`__
7-
your account team to inquire about Professional Services.
5+
If you would like to migrate pre-6.0 versions of MongoDB Server using
6+
``mongosync``, please `contact <https://mongodb.com/contact>`__ your
7+
account team to inquire about Professional Services.
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
The source and destination clusters must have the same number of
2-
shards. You cannot reverse sync when the clusters have different
3-
topologies.
1+
The source and destination clusters must have the same number of shards.
2+
You cannot reverse sync when the clusters have different topologies or
3+
major versions.

source/includes/in-dev.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. warning:: MongoDB {+c2c-product-name+} {+version-dev+} Not Yet Available
2+
3+
MongoDB {+c2c-product-name+} {+version-dev+} is not yet
4+
available. This version of the documentation is for an upcoming release and
5+
is currently a work in progress.

source/includes/live-upgrade.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Starting in ``mongosync`` 1.7.0, you can upgrade ``mongosync`` without
2+
restarting data synchronization operations from the beginning. You can
3+
only live upgrade from ``mongosync`` 1.6.0 or later to ``mongosync``
4+
1.7.0 or later.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. warning::
2+
3+
Setting ``loadLevel`` higher than the default of ``3`` may negatively
4+
impact the destination cluster performance.

source/includes/table-permissions-self-hosted.rst

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515

1616
- readAnyDatabase
1717
- backup
18-
- clusterMonitor (sharded clusters only)
18+
- clusterMonitor
1919

2020
* - default
2121
- destination cluster
2222
-
2323

2424
- readWriteAnyDatabase
2525
- restore
26-
- clusterManager (sharded clusters only)
26+
- clusterMonitor
27+
- clusterManager
2728

2829
* - write-blocking or reversing
2930
- source cluster
@@ -32,7 +33,8 @@
3233
- readWriteAnyDatabase
3334
- backup
3435
- restore
35-
- clusterManager (sharded clusters only)
36+
- clusterMonitor
37+
- clusterManager
3638

3739
* - write-blocking or reversing
3840
- destination cluster
@@ -41,7 +43,8 @@
4143
- readWriteAnyDatabase
4244
- backup
4345
- restore
44-
- clusterManager (sharded clusters only)
46+
- clusterMonitor
47+
- clusterManager
4548

4649
For details on server roles, see: :ref:`authorization`.
4750

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
In ``mongosync`` versions earlier than 1.7.0, the source and
2+
destination clusters must run the same MongoDB server version
3+
and have the same :dbcommand:`Feature Compatibility Version
4+
<setFeatureCompatibilityVersion>`.

source/index.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Cluster-to-Cluster Sync
55
=======================
66

7+
.. include:: /includes/in-dev.rst
78

89
.. default-domain:: mongodb
910

source/multiple-mongosyncs.txt

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ There are two ways to synchronize :ref:`sharded clusters
1818
loaded clusters, use multiple ``monogosync`` instances, one
1919
``monogosync`` for each shard in the cluster.
2020

21-
.. include:: /includes/sharding-warning
22-
2321
.. _c2c-sharded-config-single:
2422

2523
Configure a Single ``mongosync`` Instance

source/quickstart.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ Follow the instructions below to setup {+c2c-product-name+}.
5353
The source and destination clusters must be:
5454

5555
- at least MongoDB 6.0.
56-
- the same server version
5756
- at least Feature Compatibility Version 6.0
58-
- the same Feature Compatibility Version
57+
58+
.. include:: /includes/version-sync-limitation.rst
59+
60+
.. include:: /includes/cross-version-sync.rst
5961

6062
The number of nodes in the destination replica set does not have
6163
to equal the number of nodes in the source replica set.

source/reference/api/reverse.txt

+28-5
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,36 @@ To use the ``reverse`` endpoint:
4444
You cannot update these options after the sync starts.
4545
- ``mongosync`` must be in the ``COMMITTED`` state.
4646
- Source and destination clusters must be MongoDB 6.0 or later.
47-
- :ref:`Unique indexes <index-type-unique>` on the original source
48-
cluster must be formatted properly. If an upgraded cluster has unique
49-
indexes that were created in MongoDB 4.2 or earlier, you must
50-
:ref:`resync <resync-replica-member>` all of the nodes in the
51-
original source cluster before reversing.
47+
- :ref:`index-type-unique` require proper formatting. Collections with indexes
48+
initially created on MongoDB 4.2 may not have the proper formatting.
49+
50+
To validate that collection indexes use the proper formatting, see
51+
:ref:`c2c-validate-unique-index`.
5252
- .. include:: /includes/fact-reverse-limitation.rst
5353
- .. include:: /includes/fact-permissions-body.rst
5454

55+
.. _c2c-validate-unique-index:
56+
57+
Validate Unique Indexes
58+
~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
In order to reverse direction, ``mongosync`` requires that all
61+
:ref:`unique <index-type-unique>` indexes use the correct formatting.
62+
Clusters that began with MongoDB 4.2 or older and were since
63+
upgraded may include unique indexes that are not properly formatted.
64+
65+
To correct indexes, you can :ref:`resync <resync-replica-member>` all nodes
66+
in the original source cluster. If you don't want to resync the cluster, you
67+
can use the :method:`db.collection.validate` method on each collection to
68+
determine whether it contains improperly formatted unique indexes.
69+
70+
.. code-block:: javascript
71+
72+
db.<collection>.validate()
73+
74+
If the method returns a warning about the unique index, you must
75+
resync all of the nodes in the original source cluster before reversing sync.
76+
5577
Request
5678
-------
5779

@@ -99,3 +121,4 @@ entire sync process to copy the original data.
99121
To view the mapping direction for the synchronization of the source and
100122
destination clusters, use the :ref:`progress <c2c-api-progress>`
101123
endpoint and check the ``directionMapping`` object.
124+

source/reference/api/start.txt

+13-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.. contents:: On this page
1111
:local:
1212
:backlinks: none
13-
:depth: 2
13+
:depth: 1
1414
:class: singlecol
1515

1616
Description
@@ -137,25 +137,20 @@ Request Body Parameters
137137
* - ``includeNamespaces``
138138
- array
139139
- Optional
140-
- Filters the databases or collections to sync. The filter syntax
141-
is:
140+
- Filters the databases or collections to include in sync.
142141

143-
.. include:: /includes/api/facts/includeNamespaces-syntax.rst
142+
.. include:: /includes/api/facts/namespace-explanation.rst
144143

145144
.. versionadded:: 1.1
146145

147-
If you configure a filter on a source cluster that has multiple
148-
databases, ``mongosync`` only syncs the databases specified in
149-
the filter definition. ``mongosync`` will not sync the other
150-
existing databases.
151-
152-
If you want to modify the filter to add a newly created database,
153-
you have to :ref:`restart the filtered sync <c2c-change-filter>`
154-
from the beginning.
146+
* - ``excludeNamespaces``
147+
- array
148+
- Optional
149+
- Filters the databases or collections to exclude from sync.
155150

156-
For more details, see: :ref:`c2c-filtered-sync`.
151+
.. include:: /includes/api/facts/namespace-explanation.rst
157152

158-
For current limitations, see: :ref:`c2c-filtering-limitations`.
153+
.. versionadded:: 1.6
159154

160155
* - ``reversible``
161156
- boolean
@@ -404,7 +399,10 @@ When ``sharding.createSupportingIndexes`` is ``true``:
404399
* If the supporting indexes don't exist, ``mongosync`` creates them on the
405400
destination cluster.
406401

407-
The ``sharding.createSupportingIndexes`` option affects all sharded collections.
402+
The ``sharding.createSupportingIndexes`` option affects all sharded
403+
collections.
404+
405+
.. _rename-during-sync:
408406

409407
Rename During Sync
410408
~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)