mongorestore error: Don't know what to do with the dump file
in mongodb 3.0 or above, we should specify the database name to restore
mongorestore -d [your_db_name] [your_dump_dir]
You probably saw this error:
ERROR: don't know what to do with file [dump]
Which means in this case, that there is no file or directory called dump
in your current working directory. So, Try this first cd c:/hw1-1/
(or whatever the correct syntax is on Windows, I can't test it.) Alternatively you can specify the full path to the dump
directory:
mongorestore c:/hw1-1/dump
If you're using mongoexport
to create the dump, be sure to use mongoimport
rather than mongorestore
to load it.