Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
MongoDB Mongosync
/

Reverse Sync Direction

To reverse the direction of a sync operation, use the following procedure to commit your sync and call the reverse endpoint.

If you want to keep your source cluster updated with new writes from your destination cluster post-cutover, you can use reverse. For more details, see Mid-sync Considerations.

Before you can reverse your sync direction, you must configure mongosync and use the start endpoint to set the following parameters:

  • reversible to true

  • enableUserWriteBlocking to true.

Warning

Unique indexes on the source cluster must not use the legacy format.

To validate that collection indexes on the source cluster use the proper formatting, see Validate Unique Indexes.

For more information on limitations and requirements of reversing sync, see reverse.

Important

If you are migrating from a pre-6.0 source cluster, you cannot reverse sync.

Use these steps to reverse the direction of your sync:

1

Follow the Finalize Cutover Process tutorial to enable write blocking and finalize your data migration.

IMPORTANT: mongosync does not support Filtered Sync during the reverse sync process.

2

Call the reverse endpoint to reverse the direction of your sync operation. Your original source cluster becomes your new destination cluster and your original destination cluster becomes your new source cluster.

mongosync replicates all writes that you performed on your new source cluster after you unblocked writes (during step 4 of the Finalize Cutover Process) to the new destination cluster.

3

Follow the Finalize Cutover Process tutorial to enable write blocking and finalize your reverse data migration.

Note

Since the source and destination clusters swap after calling the reverse endpoint, "source" refers to the old destination cluster and the "destination" refers to the old source cluster.

Back

Migrate Persistent Query Settings

On this page