Mongodb migration data from a replicaset cluster (4.2 V) to a new sharding cluster (4.2 V)

Hello,

Is there a best practice way to migrate data from a replicaset cluster to a new sharding cluster in poduction environments? (Within minimum downtime for APIs.) .

When we use mongodump/mongorestore tools to move all data (about 400GB), it takes a lot of time to complete. It doesn’t seem like the best way for a production environment migration.

Is there a step-by-step scenario to consider like point-in-time backup and restore to migrate data from a replica set to a new sharding cluster?

I found the following implementation, but it says it won’t be useful in sharding clusters: How to manually perform a point in time restore in MongoDB

Thanks,

Is there a reason you’re performing a dump/restore? Have you seen the documentation on the MongoDB site on how to Convert a Replica Set to a Sharded Cluster? Following these steps does not require a dump/restore.

1 Like

Hi @Doug_Duncan,

Yes, I checked that. We cant use the convert way because there is no network connection between these clusters, we won’t use the oldest node (replica set cluster nodes) when this migration is completed.

Thanks,