Navigation

Migrate a Replica Set Member to a New Server

Overview

For Cloud Manager managed replica sets, you can replace one member of a replica set with another new member from the Cloud Manager console. Use this process to migrate members of replica sets to new underlying servers. From a high level, this procedure requires that you add a member to the replica set on the new server and then shut down the existing member on the old server. Specifically, you will

  1. Provision the new server.
  2. Add an extra member to the replica set.
  3. Shut down old member of the replica set.
  4. Un-manage the old member (Optional).

Considerations

Initial Sync

When you add a new replica set member, the member must perform an initial sync, which takes time to complete, depending on the size of your data set. For more information on initial sync, see Replica Set Data Synchronization.

Migrating Multiple Members

When migrating multiple members, you must keep a majority of voting members active with respect to the original number of voting members. Otherwise your primary will step down and your replica set become read-only. You can remove multiple members at once only if doing so leaves a majority. For more information on voting, see Replica Set High Availability and Replica Set Elections in the MongoDB Manual.

Removing members during migration might affect the ability of the replica set to acknowledge writes, depending on the level of write concern you use. For more information, see Write Concern in the MongoDB manual.

Procedure

Perform this procedure separately for each member of a replica set to migrate.

1

Provision the new server.

See Provision Servers.

2

Click Deployment, then the Processes tab, then the Topology view.

3

On the line listing the replica set, click Modify.

4

Add a member to the replica set.

In the MongoDs Per Replica Set field, increase the number of members by 1, and then click Apply.

5

Verify the server to which Cloud Manager will deploy the new member.

Click the Servers tab to view the server to which Cloud Manager will deploy the new member. If Cloud Manager has not chosen the server you intended, drag the new replica set member to the server to which to deploy it.

6

Click Review & Deploy to review your changes.

7

Review and approve your changes.

Cloud Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.
8

Verify that the new member has synchronized.

On the Deployment page, select the Processes tab to view the new member’s status. Verify that the new member has synchronized and is no longer in the Recovering state.

9

Remove the old member from the replica set.

Click the member’s ellipsis icon and select Remove from Replica Set. Click Review Changes and then click Confirm & Deploy.

10

Shut down the old member.

Click the member’s ellipsis icon and select Shutdown. Click Review Changes and then click Confirm & Deploy.

11

Optionally, remove the old member.

To remove the member from Cloud Manager management, see Remove a Process from Management or Monitoring.