Connection closed error , while exporting db data from Moralis to our local machine

Trying to export data after completing other selfhost processes, we have whitelisted our IP on Moralis but keep getting “connection to ip:port closed”. Initially it was connection refused when we didn’t whitelist an IP, after whitelisting IP we got connection closed error. We tried with mongodump as well as with script

mongodump mongodb://moralisip:port --db=parse

Failed: can't create session: could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: ip:port, Type: Unknown, Last error: connection() error occurred during connection handshake: connection(ip:port[-64]) incomplete read of message header: read tcp ip:port->ip:port: read: connection reset by peer }, ] }

do you get that error instantly when you try to dump the database?
the size of the database is expected to be big or is small?
does it work to see the database data in the dashboard interface?

  1. It would take about 10 secs then prints the message
  2. I cant really say how large or small but we have been having data say 9months.
  3. I don’t understand the 3rd question but we can see our database data on Moralis db dashboard , so we are trying to dump so we can import to our selfhost mongodb which can now be viewed on our selfhost parse dashboard

what is the server url?

it should work, all your servers have relatively few rows in the database

Exactly…So we are just stuck . Is there an alternative to getting our data off?,because thats what’s left to complete our selfhost process

mongodump mongodb://moralisip:port --db=parse

By the way, will --db be ‘parse’ or the name of the db on Moralis?

you can DM me on discord to see what doesn’t work

yes, it will be parse the database, you can also dump all the databases at once