Trying to export a database... getting "no reachable servers"


#1

Any Meteor Up aficionados here?

Longtime fan of mup but have hit a wall today trying to create a database export. As you know, the database is in a docker container and I can access it just fine via docker exec -it mongodb mongo my_database

But when I try to dump the db from the server command line using:

docker run -it --rm --link mongodb:mongo -v /tmp/mongobackup:/tmp mongo bash -c 'mongodump -v --host 127.0.0.1 --db my_database --dumpDbUsersAndRoles --out=/tmp'

I get:

Failed: error connecting to db server: no reachable servers

Have tried with and without --host, with --host localhost, without --db and just about every other configuration I can think of.

Any thoughts or recommendations?

Gracias!


#2

As is always the rule, found the answer within 3 minutes of posting:

docker exec -it mongodb bash -c 'mongodump -d my_database -o /tmp'

Hope this helps someone else facing a similar issue.