@@ -13,11 +13,17 @@ Configuration
13
13
:class: singlecol
14
14
15
15
You can configure :ref:`mongosync <c2c-mongosync>` instances at startup
16
- using a configuration file. The configuration file contains settings that are
16
+ by using :ref:`command line options <c2c-cli-options>` or a configuration file.
17
+ The configuration file specifies values for settings that are
17
18
the equivalent of ``mongosync`` command line options.
18
19
20
+ During a migration, you can reconfigure certain ``mongosync`` settings by following the
21
+ steps in :ref:`c2c-reconfigure-mid-migration`.
22
+
23
+ .. _c2c-configuration-file:
24
+
19
25
Configuration File
20
- ==================
26
+ ------------------
21
27
22
28
You can write most ``mongosync``
23
29
:ref:`command line options <c2c-cli-options>` to a YAML file. The
@@ -37,10 +43,14 @@ To use a configuration file, start ``mongosync`` with the
37
43
38
44
.. code-block:: console
39
45
40
- $ mongosync --config mongosync.conf
46
+ mongosync --config <configPath>
47
+
48
+ Settings
49
+ ~~~~~~~~
50
+
51
+ You can configure the following ``mongosync`` settings using a configuration file.
41
52
42
- Options
43
- =======
53
+ To configure ``mongosync`` from the command line, see :ref:`c2c-cli-options`.
44
54
45
55
.. note::
46
56
@@ -133,3 +143,78 @@ Options
133
143
134
144
To set the ``verbosity`` setting from the command line, see the
135
145
:option:`--verbosity` option.
146
+
147
+ .. _c2c-reconfigure-mid-migration:
148
+
149
+ Reconfigure ``mongosync`` During Synchronization
150
+ ------------------------------------------------
151
+
152
+ .. important::
153
+
154
+ Only the following settings can be adjusted during a migration.
155
+ Other settings **must** remain unchanged between ``mongosync`` restarts.
156
+
157
+ While ``mongosync`` is syncing, you can reconfigure the :option:`--config`, :option:`--disableTelemetry`,
158
+ :option:`--loadLevel`, :option:`--logPath`, :option:`--port`, and :option:`--verbosity` options
159
+ by performing the following steps:
160
+
161
+ .. procedure::
162
+ :style: normal
163
+
164
+ .. step:: (Optional) Pause the ``mongosync`` processes
165
+
166
+ Run :ref:`c2c-api-pause` on each running ``mongosync`` process.
167
+
168
+ You can resume the ``mongosync`` processes later from the paused
169
+ state, as shown in the final step.
170
+
171
+ .. tip::
172
+
173
+ If you don't want to immediately resume data synchronization
174
+ operations after reconfiguration, consider pausing the
175
+ ``mongosync`` processes. This is useful if you're coordinating
176
+ operations from multiple ``mongosync`` processes.
177
+
178
+ .. step:: Stop the ``mongosync`` processes
179
+
180
+ Use your operating system to stop each running ``mongosync`` process.
181
+ For the specific steps, see your operating system documentation.
182
+
183
+ .. step:: (Optional) Update your configuration file
184
+
185
+ If you used the :option:`--config` option to set the path to a configuration file
186
+ when you first initialized ``mongosync``, update this configuration file with the new value for each setting.
187
+
188
+ .. step:: Initialize the ``mongosync`` processes
189
+
190
+ If you updated a configuration file in the last step, initialize
191
+ the ``mongosync`` processes with the :option:`--config` option
192
+ set to the path of the updated configuration file:
193
+
194
+ .. code-block:: console
195
+
196
+ mongosync --config <configPath>
197
+
198
+ If you did *not* use the :option:`--config` option when you first initialized ``mongosync``,
199
+ initialize the ``mongosync`` processes with the command line options set to their updated values:
200
+
201
+ .. code-block:: console
202
+
203
+ mongosync \
204
+ --cluster0 "<cluster0_connection_string>" \
205
+ --cluster1 "<cluster1_connection_string>" \
206
+ --loadLevel <newLevel>
207
+
208
+ For more information, see :ref:`Initialize mongosync <c2c-initialize>`.
209
+
210
+ .. step:: Start or Resume the ``mongosync`` processes
211
+
212
+ If you paused any ``mongosync`` processes earlier in the optional first step,
213
+ run :ref:`c2c-api-resume` on the paused ``mongosync`` processes.
214
+
215
+ If you stopped any ``mongosync`` processes without using :ref:`c2c-api-pause`,
216
+ run :ref:`c2c-api-start` on the stopped ``mongosync`` processes.
217
+ For more detailed instructions, see :ref:`c2c-quickstart-synchronize`.
218
+
219
+ ``mongosync`` resumes the sync roughly where it was before you stopped the earlier proceses.
220
+ Any partitions that were in progress at the time of termination will restart from the beginning.
0 commit comments