Connecting to MongoDB from Moralis

I need to dump my moralis Mongo databse into a file
I installed mongodb-tools
used mongodump command using host and port provided in moralis-mongo
It is unable to connect saying Unreachable server.

How do i dump and restore?
I am following the article mentioned in Migrating Database in self hosting servers

You have to whitelist your public ip

Failed: error counting admin.system.version: EOF

I get the following error for the same"
What could be the issue?

2022-12-16T12:12:00.951+0530 writing admin.system.version to
2022-12-16T12:12:01.483+0530 Failed: error dumping users and roles: error writing data for collection admin.system.version to disk: error reading collection: Failed to parse: { find: “system.version”, skip: 0, snapshot: true, $readPreference: { mode: “secondaryPreferred” }, $db: “admin” }. Unrecognized field ‘snapshot’.
ayodhverma@IB-SEZ-LAP-458:

What do you try to do?
It works from python or nodejs or an interface that knows how to connect to mongo db?

I need to self host my server
For that I need to migrate my data from moralis inbuilt mongo to my self hosted mongodb.
It threw the above error while i was performing those

I mean, how do you try to connect to the database and dump it

You can follow the instructions here if you haven’t seen them.