@@ -61,23 +61,26 @@ Global Options
61
61
For more information on connecting ``mongosync``, see
62
62
:ref:`Connections <c2c-connecting>`.
63
63
64
- .. option:: --verbosity <level >
64
+ .. option:: --config <filename >
65
65
66
- *Default*: ``INFO``
66
+ Sets the path to the configuration file.
67
67
68
- Sets the verbosity level to use in log messages.
69
- {+c2c-product-name+} logs all messages at the specified level and
70
- any messages at lower levels.
68
+ For more information, see :ref:`c2c-mongosync-config`.
71
69
72
- The ``--verbosity`` option supports the following values:
70
+ .. option:: --help, h
73
71
74
- - ``TRACE``
75
- - ``DEBUG``
76
- - ``INFO``
77
- - ``WARN``
78
- - ``ERROR``
79
- - ``FATAL``
80
- - ``PANIC``
72
+ Prints usage information to stdout.
73
+
74
+ .. option:: --id <ID>
75
+
76
+ Sets an identifier for the ``mongosync`` instance.
77
+
78
+ Use this option when running multiple instances of ``mongosync`` on
79
+ a sharded cluster, to synchronize the shards individually.
80
+
81
+ The ``--id`` option must correspond to the shard ID of the shard it
82
+ syncs. To find the shard ID, use the :dbcommand:`listShards`
83
+ command.
81
84
82
85
.. option:: --logPath <DIR>
83
86
@@ -91,31 +94,28 @@ Global Options
91
94
Sets the port used by the HTTP server for the {+c2c-product-name+}
92
95
HTTP API.
93
96
94
- .. option:: --id <ID>
95
-
96
- Sets an identifier for the ``mongosync`` instance.
97
+ .. option:: --verbosity <level>
97
98
98
- Use this option when running multiple instances of ``mongosync`` on
99
- a sharded cluster, to synchronize the shards individually.
100
-
101
- The ``--id`` option must correspond to the shard ID of the shard it
102
- syncs. To find the shard ID, use the :dbcommand:`listShards`
103
- command.
99
+ *Default*: ``INFO``
104
100
105
- .. option:: --config <filename>
101
+ Sets the verbosity level to use in log messages.
102
+ {+c2c-product-name+} logs all messages at the specified level and
103
+ any messages at lower levels.
106
104
107
- Sets the path to the configuration file.
105
+ The ``--verbosity`` option supports the following values:
108
106
109
- For more information, see :ref:`c2c-mongosync-config`.
107
+ - ``TRACE``
108
+ - ``DEBUG``
109
+ - ``INFO``
110
+ - ``WARN``
111
+ - ``ERROR``
112
+ - ``FATAL``
113
+ - ``PANIC``
110
114
111
115
.. option:: --version, -v
112
116
113
117
Prints ``mongosync`` version information to stdout.
114
118
115
- .. option:: --help, h
116
-
117
- Prints usage information to stdout.
118
-
119
119
Behavior
120
120
--------
121
121
@@ -182,6 +182,29 @@ show an empty ``system.views`` collection in that database. The empty
182
182
``system.views`` collection will not change the accuracy of user
183
183
data on the destination.
184
184
185
+ Write Blocking
186
+ ~~~~~~~~~~~~~~
187
+
188
+ By default, write-blocking is not enabled during synchronization. When
189
+ write-blocking is enabled, ``mongosync`` blocks writes:
190
+
191
+ - On the destination cluster during replication
192
+ - On the source cluster while committing
193
+
194
+ To enable write-blocking, use the :ref:`start API <c2c-api-start>`
195
+ to set ``enableUserWriteBlocking`` to ``true``.
196
+
197
+ :ref:`Reverse synchronization <c2c-api-reverse>` requires
198
+ write-blocking. To enable reverse synchronization between the source
199
+ and destination clusters, use the ``start API`` to initiate replication
200
+ with ``reversible`` and ``enableUserWriteBlocking`` set to ``true``.
201
+ The options must be set when replication begins, they cannot be updated
202
+ later.
203
+
204
+ To set ``enableUserWriteBlocking``, the ``mongosync`` user must have a
205
+ role that includes the ``setUserWriteBlockMode`` and
206
+ ``bypassWriteBlockingMode`` ActionTypes.
207
+
185
208
Examples
186
209
--------
187
210
0 commit comments