19
19
Description
20
20
-----------
21
21
22
- The ``mongosync`` binary is the primary process used in Cluster-to-Cluster Sync.
23
- It migrates data from one cluster to another and can keep the clusters
24
- in continuous sync.
22
+ The ``mongosync`` binary is the primary process used in
23
+ {+c2c-product-name+}. ``mongosync`` migrates data from one cluster to
24
+ another and can keep the clusters in continuous sync.
25
25
26
- This document provides a complete overview of all command-line options.
26
+ This document provides a complete overview of the ``mongosync`` command
27
+ line options.
28
+
29
+ .. note::
30
+
31
+ - Both the source cluster and destination cluster must use MongoDB
32
+ 6.0 or later.
33
+ - ``mongosync`` supports replica sets and sharded clusters.
34
+ - Standalone MongoDB instances are not supported. :ref:`Convert the
35
+ standalone instance <server-replica-set-deploy-convert>` to a
36
+ replica set before using {+c2c-product-name+}.
27
37
28
38
Options
29
39
-------
@@ -34,39 +44,30 @@ Global Options
34
44
.. option:: --cluster0 <URI>
35
45
36
46
Sets the :ref:`connection URI <mongodb-uri>` for the first cluster.
37
- The first cluster can serve as either the source cluster or the destination
38
- cluster in the sync process.
39
-
40
- .. note::
41
-
42
- The cluster must use MongoDB 6.0 or later.
43
-
47
+ The first cluster can serve as either the source or the destination
48
+ in the sync process. Designate the source and destination clusters
49
+ in the call to the :ref:`c2c-api-start` API endpoint.
44
50
45
51
For more information on connecting ``mongosync``, see
46
52
:ref:`Connections <c2c-connecting>`.
47
53
48
-
49
54
.. option:: --cluster1 <URI>
50
55
51
56
Sets the :ref:`connection URI <mongodb-uri>` for the second cluster.
52
- The second cluster can serve as either the source cluster or the destination
53
- cluster in the sync process.
54
-
55
- .. note::
56
-
57
- The cluster must use MongoDB 6.0 or later.
58
-
57
+ The second cluster can serve as either the source or the destination
58
+ in the sync process. Designate the source and destination clusters
59
+ in the call to the :ref:`c2c-api-start` API endpoint.
59
60
60
61
For more information on connecting ``mongosync``, see
61
62
:ref:`Connections <c2c-connecting>`.
62
63
63
-
64
64
.. option:: --verbosity <level>
65
65
66
66
*Default*: ``INFO``
67
67
68
- Sets the verbosity level to use in log messages. Cluster-to-Cluster Sync logs
69
- all messages at the specified level as well as any messages at less severe levels.
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.
70
71
71
72
The ``--verbosity`` option supports the following values:
72
73
@@ -78,46 +79,43 @@ Global Options
78
79
- ``FATAL``
79
80
- ``PANIC``
80
81
81
-
82
82
.. option:: --logPath <DIR>
83
83
84
- Sets the path to the log directory. Cluster-to-Cluster Sync writes logs to
85
- files in this directory.
86
-
84
+ Sets the path to the log directory. {+c2c-product-name+} writes logs
85
+ to files in this directory.
87
86
88
87
.. option:: --port
89
88
90
89
*Default*: ``27182``
91
90
92
- Sets the port used by the HTTP server for the Cluster-to-Cluster Sync REST API.
93
-
91
+ Sets the port used by the HTTP server for the {+c2c-product-name+}
92
+ REST API.
94
93
95
94
.. option:: --id <ID>
96
95
97
96
Sets an identifier for the ``mongosync`` instance.
98
97
99
- Use this option when running multiple instances of ``mongosync`` on a sharded
100
- cluster, to synchronize the shards individually. The ``--id`` option must
101
- correspond to the shard ID of the shard it
102
- syncs. To find the shard ID, use the :dbcommand:`listShards` command.
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.
103
104
104
105
.. option:: --config <filename>
105
106
106
107
Sets the path to the configuration file.
107
108
108
109
For more information, see :ref:`c2c-mongosync-config`.
109
110
110
-
111
111
.. option:: --version, -v
112
112
113
113
Prints ``mongosync`` version information to stdout.
114
114
115
-
116
115
.. option:: --help, h
117
116
118
117
Prints usage information to stdout.
119
118
120
-
121
119
Behavior
122
120
--------
123
121
@@ -126,16 +124,16 @@ Behavior
126
124
Configuration File
127
125
~~~~~~~~~~~~~~~~~~
128
126
129
- Options for ``mongosync`` can be set in a YAML configuration file, specified
130
- using the :option:`--config` option. For example:
127
+ Options for ``mongosync`` can be set in a YAML configuration file. Use
128
+ the :option:`--config` option. To specify the path to the configuration
129
+ file. For example:
131
130
132
131
.. code-block:: yaml
133
132
134
133
# Cluster Configuration
135
134
cluster0: "mongodb://192.0.2.10:27017,192.0.2.11:27017,192.0.2.12:27017"
136
135
cluster1: "mongodb://192.0.2.20:27017,192.0.2.21:27017,192.0.2.22:27017"
137
136
138
-
139
137
Examples
140
138
--------
141
139
@@ -165,4 +163,14 @@ Examples
165
163
.. code-block:: json
166
164
:copyable: false
167
165
168
- { "success": true }
166
+ { "success": true }
167
+
168
+
169
+ .. code-block: shell
170
+
171
+ 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890
172
+
173
+ .. code-block: shell
174
+ :copyable: false
175
+
176
+ 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 67890
0 commit comments