Docs Menu
Docs Home
MongoDB Cluster-to-Cluster Sync
/ /


On this page

  • Description
  • Requirement
  • Request
  • Request Body Parameters
  • Response
  • Example
  • Request
  • Response
  • Behavior
  • Endpoint Protection

Pauses the current synchronization operation.

To use the pause endpoint, mongosync must be in the RUNNING state.


When you configure multiple mongosync instances to sync between sharded clusters, you must send identical API endpoint commands to each mongosync instance.

For more information, see Pause Multiple Mongosyncs.

POST /api/v1/pause

This endpoint does not use HTTP request body parameters. However, you must specify the --data option with an empty object { }.

When the request is successful, this value is true.
If an error occurred, indicates the name of the error. This field is omitted from the response when success is true.
Detailed description of the error that occurred. This field is omitted from the response when success is true.

The following example pauses the current synchronization operation.

curl localhost:27182/api/v1/pause -XPOST --data '{ }'
  • If the pause request is successful, mongosync enters the PAUSED state.

  • If you plan to pause synchronization for an extended period of time, increase the size of the replica set oplog in the source cluster. To learn more, see Frequently Asked Questions.

mongosync does not protect the pause endpoint. However, by default the API binds to localhost only and does not accept calls from other sources. Additionally, the pause call does not expose connection credentials or user data.

← progress
resume →