Search code examples
node.jsmongodbmongoosemongodump

Trying to use mongodump with remote server heroku using mongolab


In my computer i'm running this command to make a backup of the information of some mongodb database.

mongodump -h <hostName>:<port> -d <databes> -u <user> -p <pass> -o direction/where/to/make Backup

But gave to me this error:

Failed: error connecting to db server: no reachable servers

I try to connect robomongo with the same user, pass, host and databes and it's work fines.

Version of mongo 3.0.1

Thanks.


Solution

  • This is basically what I figure from this link

    • The new mongo tool set doesn't work too well with Unix Domain Socket . The issue is still open.
    • If you're connecting via hostname try using the IP as the link suggests.

    Hope this helps.