Skip to content

Commit 5b9a8cf

Browse files
authored
DOCSP-45263-adding-reverse-tutorial (#481) (#515) (#516)
* 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 234d7b2 commit 5b9a8cf

File tree

5 files changed

+88
-10
lines changed

5 files changed

+88
-10
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: 7 additions & 0 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

@@ -158,4 +161,8 @@ Endpoint Protection
158161
.. |endpoint| replace:: ``reverse``
159162
.. include:: /includes/fact-api-endpoint
160163

164+
Limitations
165+
~~~~~~~~~~~
161166

167+
The ``reverse`` endpoint does not support :ref:`filtered sync
168+
<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.
@@ -64,29 +64,29 @@ Steps
6464

6565
.. step:: Stop any write operations to the synced collections on the source.
6666

67-
- If you started ``mongosync`` with ``enableUserWriteBlocking``
67+
- If you start ``mongosync`` with ``enableUserWriteBlocking``
6868
set to ``true``, ``mongosync`` blocks all write operations on
6969
the entire source cluster during the commit (step 4) for you.
7070
- If you didn't start ``mongosync`` with
71-
``enableUserWriteBlocking``, ensure that writes are disabled.
71+
``enableUserWriteBlocking``, ensure that you disable writes.
7272
For example, run the :dbcommand:`setUserWriteBlockMode` command on the
7373
source cluster:
7474

7575
.. code-block:: javascript
7676

7777
db.adminCommand( {
78-
setUserWriteBlockMode: 1,
79-
global: true
78+
setUserWriteBlockMode: 1,
79+
global: true
8080
} )
8181

8282
- If ``mongosync`` uses filtered sync, it's not necessary to
83-
disable writes to the entire source cluster. But you must ensure
84-
that write operations are stopped for the collections included
85-
by the filter.
83+
disable writes to the entire source cluster. However, you must ensure
84+
that you stop write operations for the collections that the
85+
filter includes.
8686

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

89-
If you started multiple ``mongosync`` instances for your
89+
If you start multiple ``mongosync`` instances for your
9090
migration, you must issue a commit request for each ``mongosync``
9191
instance.
9292

@@ -109,6 +109,8 @@ Steps
109109
to ensure that the ``mongosync`` state is ``COMMITTING`` or
110110
``COMMITTED``.
111111

112+
Once you complete this step, ``mongosync`` blocks writes on the source cluster.
113+
112114
.. step:: Wait until you can perform writes on the destination cluster.
113115

114116
Call the ``progress`` endpoint to determine if ``canWrite`` is
@@ -168,7 +170,7 @@ Steps
168170
:language: json
169171

170172
"COMMITTED"
171-
173+
172174
Behavior
173175
--------
174176

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)