Skip to content

Commit 14a154a

Browse files
authored
DOCSP-45263-adding-reverse-tutorial (#481)
* DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263-adding-reverse-tutorial * DOCSP-45263 copy edits * DOCSP-45263 copy edits * DOCSP-45263 adding note on multiple mongosyncs page * DOCSP-45263 tech edit * DOCSP-45263 tech edit * DOCSP-45263 linking reverse to cutover
1 parent e5a1f0f commit 14a154a

File tree

5 files changed

+86
-13
lines changed

5 files changed

+86
-13
lines changed

source/reference.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Reference
5858
Authentication Using Workload Identity Federation </reference/authentication>
5959
oplog Sizing </reference/oplog-sizing>
6060
Finalize Cutover Process </reference/cutover-process>
61+
Reverse Sync Direction </reverse-sync>
6162
Limitations </reference/limitations>
6263
Logging </reference/logging>
6364
User Permissions </reference/permissions>

source/reference/api/reverse.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ that occurred on ``cluster1`` after ``mongosync`` reached
3333
``canWrite=true``. To check the ``canWrite`` status during
3434
sync, use the :ref:`/progress <c2c-api-progress>` endpoint.
3535

36+
For more information and a tutorial on using the ``reverse`` endpoint,
37+
see :ref:`c2c-reverse-process`.
38+
3639
Requirements
3740
------------
3841

@@ -171,6 +174,5 @@ Endpoint Protection
171174
Limitations
172175
~~~~~~~~~~~
173176

174-
The ``reverse`` endpoint does not support :ref:`filtered sync <c2c-filtered-sync>`.
175-
176-
177+
The ``reverse`` endpoint does not support :ref:`filtered sync
178+
<c2c-filtered-sync>`.

source/reference/cutover-process.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Steps
3232
.. procedure::
3333
:style: normal
3434

35-
.. step:: Verify the status of the ``mongosync`` process.
35+
.. step:: Verify the status of mongosync.
3636

3737
Call the :ref:`progress <c2c-api-progress>` endpoint to determine
3838
the status of ``mongosync`` before starting the cutover process.
@@ -76,29 +76,29 @@ Steps
7676

7777
.. step:: Stop any write operations to the synced collections on the source.
7878

79-
- If you started ``mongosync`` with ``enableUserWriteBlocking``
79+
- If you start ``mongosync`` with ``enableUserWriteBlocking``
8080
set to ``true``, ``mongosync`` blocks all write operations on
8181
the entire source cluster during the commit (step 4) for you.
8282
- If you didn't start ``mongosync`` with
83-
``enableUserWriteBlocking``, ensure that writes are disabled.
83+
``enableUserWriteBlocking``, ensure that you disable writes.
8484
For example, run the :dbcommand:`setUserWriteBlockMode` command on the
8585
source cluster:
8686

8787
.. code-block:: javascript
8888

8989
db.adminCommand( {
90-
setUserWriteBlockMode: 1,
91-
global: true
90+
setUserWriteBlockMode: 1,
91+
global: true
9292
} )
9393

9494
- If ``mongosync`` uses filtered sync, it's not necessary to
95-
disable writes to the entire source cluster. But you must ensure
96-
that write operations are stopped for the collections included
97-
by the filter.
95+
disable writes to the entire source cluster. However, you must ensure
96+
that you stop write operations for the collections that the
97+
filter includes.
9898

9999
.. step:: Send a :ref:`commit <c2c-api-commit>` request to ``mongosync``.
100100

101-
If you started multiple ``mongosync`` instances for your
101+
If you start multiple ``mongosync`` instances for your
102102
migration, you must issue a commit request for each ``mongosync``
103103
instance.
104104

@@ -121,6 +121,8 @@ Steps
121121
to ensure that the ``mongosync`` state is ``COMMITTING`` or
122122
``COMMITTED``.
123123

124+
Once you complete this step, ``mongosync`` blocks writes on the source cluster.
125+
124126
.. step:: Wait until you can perform writes on the destination cluster.
125127

126128
Call the ``progress`` endpoint to determine if ``canWrite`` is
@@ -180,7 +182,7 @@ Steps
180182
:language: json
181183

182184
"COMMITTED"
183-
185+
184186
Behavior
185187
--------
186188

source/reverse-sync.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. _c2c-reverse-process:
2+
3+
======================
4+
Reverse Sync Direction
5+
======================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:class: singlecol
13+
:depth: 1
14+
15+
To reverse the direction of a sync operation, use the following
16+
procedure to :ref:`commit your sync <c2c-cutover-process>` and call the
17+
``reverse`` endpoint.
18+
19+
Reversing sync allows you to keep clusters in continuous sync after you
20+
commit. After you commit a sync, you can't resume continuous sync between
21+
two clusters since ``mongosync`` can only sync into empty destination
22+
clusters. If you need to use the same two clusters after cutover, you
23+
can call the ``reverse`` endpoint to keep the clusters in sync.
24+
25+
Before You Begin
26+
----------------
27+
28+
Before you can reverse your sync direction, you must configure
29+
``mongosync`` and use the :ref:`c2c-api-start` endpoint to set the
30+
following parameters:
31+
32+
- ``reversible`` to ``true``
33+
- ``enableUserWriteBlocking`` to ``true``.
34+
35+
For more information on limitations and requirements of reversing sync,
36+
see :ref:`c2c-api-reverse`.
37+
38+
Steps
39+
-----
40+
41+
Use these steps to reverse the direction of your sync:
42+
43+
.. procedure::
44+
:style: normal
45+
46+
.. step:: Finalize your sync.
47+
48+
Follow the :ref:`c2c-cutover-process` tutorial to enable write
49+
blocking and finalize your data migration.
50+
51+
:gold:`IMPORTANT:` ``mongosync`` does not support
52+
:ref:`c2c-filtered-sync` during the reverse sync process.
53+
54+
.. step:: Call the ``reverse`` endpoint.
55+
56+
Call the ``reverse`` endpoint to reverse the direction of your sync
57+
operation. Your original source cluster becomes your new destination cluster
58+
and your original destination cluster becomes your new source cluster.
59+
60+
``mongosync`` replicates all writes that you performed on your new
61+
source cluster after you unblocked writes (during step 4 of the
62+
:ref:`c2c-cutover-process`) to the
63+
new destination cluster.

source/topologies/multiple-mongosyncs.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ Data Verification
278278
Reverse the Synchronization Direction
279279
-------------------------------------
280280

281+
.. note::
282+
283+
For an in-depth tutorial on reversing your synchronization direction,
284+
see :ref:`c2c-reverse-process`.
285+
281286
To reverse synchronization so that the original destination cluster
282287
acts as the source cluster:
283288

0 commit comments

Comments
 (0)