Create Replica Sets on an existing sharded MongoDB

Posted on

Question :

How do I convert an existing mongodb instance that has sharding enabled for some of its collections to a replica set? I am able to do it the other way around, but I am not able to figure out how to add replication to existing sharded mongo instances.

Answer :

You don’t convert collections to a replica set. You convert (stand alone shard) node (where all databases and collections are) to the replica set.

Convert (stand alone) node to the replica set, follow these instructions.

Leave a Reply

Your email address will not be published. Required fields are marked *