mongorestore error: Don't know what to do with the dump file

Prasanna Aarthi picture Prasanna Aarthi · Jan 20, 2014 · Viewed 81.8k times · Source

I have mongo DB installed in the following path c:\mongodb\bin. I have configured my environment variable PATH in advanced settings.I also have mongod running .When I run the following command mongorestore dump from the following path c:\hw1-1\dump (This contains the BSON files) I'm getting this error:

Don't know what to do with the dump file

I have referred to this thread to check my path.

Answer

clevertension picture clevertension · Apr 15, 2015

in mongodb 3.0 or above, we should specify the database name to restore

mongorestore -d [your_db_name] [your_dump_dir]