Navigation

Pause or Terminate Sync

On this page

  • Overview
  • Pause Sync
  • Procedure
  • Resume Sync
  • Procedure
  • Terminate Sync
  • Procedure
  • Re-Enable Sync
  • Procedure

If you want to disable Realm Sync for your app, you can temporarily pause or permanently terminate it. You can also re-enable Sync after disabling it.

You can temporarily pause Sync if you need to pause your cluster. With a temporary pause, you can resume without resetting your Sync configuration or losing Sync metadata.

You can permanently terminate and re-enable Sync for troubleshooting or if you want to change your Sync configuration.

You can pause Realm Sync for a period of time without disabling it entirely. When you pause Sync, you stop syncing changes between Atlas and your application.

Important

If you need to pause your cluster, pause Realm Sync first. Otherwise, you must terminate and re-enable Sync and perform a client reset.

Pausing Sync rejects any incoming client connections. This means that pausing Realm Sync for your Realm app stops syncing changes for all clients. To pause Sync from the client side, using logic that situationally pauses Sync during a session, see your preferred SDK:

After pausing Sync, you can re-enable it. Pausing Sync maintains the configuration settings and all of the Sync metadata, which contains the sync history. When you re-enable paused Sync, your clients can reconnect normally.

Warning

If your oplog rolls past the time that you paused Sync, you must terminate and re-enable Sync. For example, if you only keep 12 hours of oplog for your cluster, and you pause Sync for longer than 12 hours, you must terminate and re-enable Sync.

Terminating and re-enabling paused Realm Sync for your Realm app erases Realm Sync metadata and requires you to specify configuration settings again. Clients must perform a client reset when they reconnect after Realm Sync has been terminated. For more information, see: Terminate Sync.

1

In the Sync tab of the MongoDB Realm UI, press the Pause Sync button.

the pause sync button
2

In the modal that pops up, press the Pause Sync button.

the pause sync model
3

Press the Review & Deploy button in the blue notification bar telling you that changes have been made to your MongoDB Realm app.

"Review & Deploy" notification
4

In the model that appears, review your changes and then press the green Deploy button.

Review Changes Model

You have now paused Realm Sync and should get a green notification bar on the top of the Sync page that states that your deployment was successful.

Review Changes Model

After you have paused Realm Sync, you can resume it to begin syncing again for all clients.

Warning

If your oplog rolls past the time that you paused Sync, you must terminate and re-enable Sync. For example, if you only keep 12 hours of oplog for your cluster, and you pause Sync for longer than 12 hours, you must terminate and re-enable Sync.

Terminating and re-enabling paused Realm Sync for your Realm app erases Realm Sync metadata and requires you to specify configuration settings again. Clients must perform a client reset when they reconnect after Realm Sync has been terminated. For more information, see: Terminate Sync.

The process to resume Sync is the same as the process to re-enable Sync. However, when you pause Sync, MongoDB Realm preserves your configuration settings and Sync metadata.

To re-enable Realm Sync, follow the steps in the Get Started with Sync guide. You can skip the Configure Sync step.

Clients do not need to perform a client reset when reconnecting after a pause.

If you have enabled Realm Sync, you may have to terminate and re-enable Realm Sync under a few different circumstances:

  • An upgrade from a Shared Tier Atlas Cluster to a Shared or Dedicated instance
  • A move to an Atlas cluster that is distributed across regions/cloud providers
  • An upgrade to NVMe Atlas clusters
  • An oplog rollover
  • A paused Realm Sync session on a shared tier cluster due to infrequent usage
  • Troubleshooting, at the request of MongoDB Support
Warning
Recovering Unsynchronized Changes after Terminating Sync

Terminating and re-enabling Realm Sync prevents unsynchronized client changes from automatically syncing. To recover any unsynchronized changes, implement a manual client reset that handles this case in your client applications:

Terminate Realm Sync in your Realm app to stop syncing data across devices.

1

In the Sync tab of the MongoDB Realm UI, click the red Terminate Sync button.

the terminate sync button
2

In the modal that pops up, check that you want to terminate sync by clicking the I want to terminate Sync checkbox and then click the Terminate Sync button on the modal.

the terminate sync model
3

Click the Review & Deploy button in the blue notification bar telling you that changes have been made to your MongoDB Realm app.

"Review & Deploy" notification
4

In the model that appears, review your changes and then click the green Deploy button.

Review Changes Model

You have now terminated Realm Sync and should get a green notification bar on the top of the Sync page that states that your deployment was successful.

Review Changes Model

After you have terminated Realm Sync, you can re-enable it. Re-enabling Sync enables your Realm app to begin syncing changes to Atlas again. After you re-enable Sync, your Realm app begins accepting incoming client connections again. However, if a client had previously connected to your Realm app before you terminated Realm Sync, you must perform a manual client reset for that client to enable it to connect to MongoDB Realm again.

When you pause Sync, MongoDB Realm preserves your configuration settings, and you can skip the Configure Sync step. When you terminate Sync, or when the oplog rolls past the time that you paused Sync, you must specify the configuration settings again.

To re-enable Realm Sync, follow the steps in the Get Started with Sync guide.

If you are re-enabling Realm Sync after you have terminated it, you must perform a manual client reset in your client applications:

Give Feedback

On this page

  • Overview
  • Pause Sync
  • Procedure
  • Resume Sync
  • Procedure
  • Terminate Sync
  • Procedure
  • Re-Enable Sync
  • Procedure