seppevs / migrate-mongo

A database migration tool for MongoDB in Node
MIT License
927 stars 163 forks source link

Does Migrate-Mongo work on a sharded cluster? #299

Closed KartikeyaSinha closed 1 year ago

KartikeyaSinha commented 3 years ago

Hi,

I have a scenario wherein my data is on sharded cluster, if we want to make any change via migrate-mongo, will it support that? Also, in case of sharded cluster what we will be providing in migrate-mongo-config.js file as the URL? Do we have to know on which shard the data exists and then provide URL of that replica set in the URL part of the config file?

Have been trying to understand internal working, but getting no response on these issue threads.

Your help would be highly appreciated!

Regards, Kartikeya

Kapumas commented 3 years ago

I have the same scenario and it didn't work, i don't know why i have this error when i try to connect getaddrinfo EAI_AGAIN I have my database in another VM with Replica and it doesn't work.

flodaniel commented 3 years ago

I am currently evaluating this package and we are also running shards on our servers. Do you have any reports regarding functionality for sharded instances?

Bijay2052 commented 2 years ago

To connect to replicaset it expects mongodb+srv uri, which needs srv record. Mongo Atlas provides srv uri when you create a cluster but if you are deploying replicaset in local machine either with k8s or on vm you might need dns srv record that points to replicasets and use that srv record in you config file.

seppevs commented 1 year ago

Closing this.