- Manage Deployments >
- Migrate a Replica Set Member to a New Server
Migrate a Replica Set Member to a New Server¶
For Ops Manager managed replica sets, you can replace one member of a replica set with another new member from the Ops 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
- Provision the new server.
- Add an extra member to the replica set.
- Shut down old member of the replica set.
- Un-manage the old member (Optional).
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.
Perform this procedure separately for each member of a replica set to migrate.
Click Deployment, then the Processes tab, then the Topology view.¶
On the line listing the replica set, click Modify.¶
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.
Verify the server to which Ops Manager will deploy the new member.¶
Click the Servers tab to view the server to which Ops Manager will deploy the new member. If Ops Manager has not chosen the server you intended, drag the new replica set member to the server to which to deploy it.
Click Review & Deploy to review your changes.¶
Review and approve your changes.¶
Ops Manager displays your proposed changes.
- If you are satisfied, click Confirm & Deploy.
- Otherwise, click Cancel and you can make additional changes.
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.
Shut down the old member.¶
Click the member’s ellipsis icon and select Shutdown. Click Review Changes and then click Confirm & Deploy.