How to migrate to atlas with mongomirror? the current mongomirror doc seems outdated

I am trying to sync our local replica set to mongo atlas with the mongomirror tool. We have created a M10 and the connect string is like this:

And according to the mongomirror doc here, the --destination parameter needs to be in a format of <RSname>/<host1>:<port1>,<host2>:<port2>,<host3>:<port3>. Given I only have one connection string shown above, how do I set the RSname, host1, port1, host2, port2, etc parameter for the --destination parameter? Is it --destination=cluster0/ without the needs to specify port1, host2, port2, etc?

Thank you in advance

You have to select the standard connection string.

If you specify an old version of the shell that is what Atlas will given you as connection string.

You may also construct it your self if you are familiar with DNS.

ah, thank you , I can see the string if I change the mongo shell version to version “3.4 or earlier”, it will show 3 hosts and ports, as well as the replica set name.

MongoDB should update this doc though, which doesn’t say how to find this multiple hosts connection string anywhere.

Use the feedback link on the page.

IMO the tool should be accepting mongodb+srv. I have not used it in some time, did you try with that style ?

not yet, I’ll try and post it later

and +1, the mongomirror should support mongodb+srv format directly

Ok, the canonical multiple-host way still works, but if you try to set the destination to mongo+srv://onehost, this format doesn’t work.

mongomirror should update their code to support it.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.