How to dump data from file in MongoDB 3.0.3 with WiredTiger

511 views Asked by At

My mongod process can't start.
MongoDB 3.0.3 has removed the --dbpath parameter from mongodump and mongoexport command.
How can I dump and restore the data to a human readable format like json or bson??

1

There are 1 answers

0
Blakes Seven On

Well simply you do not use the --dppath option and just connect to a running database instance. That is basically a concept added since the inclusion of "pluggable storage", so the "database reading logic" is no longer "built in" to the utility but it just uses a standard network "driver" connection itself.

So now MongoDB utilities as of 3.x versions do not "talk directly" to the database files themselves. They now need a running server to talk to.

For anything off the "localhost" use the --host and --port options or connection "url" string to establish a connection to the server.

If you have problems "starting the process" then that should be another question here, about "how to start the process when I get this error". But the 3.x utilities act in this way "by design" and if you wish for something else running "Wired Tiger" then you are not going to find it.

Even with earlier versions, if the server doesn't start then it's unlikely the "raw access" ultiliies are going to help you here. But not sure of the case because that was not your question.