mongorestore error: Don't know what to do with

2020-05-12 02:43发布

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.

7条回答
够拽才男人
2楼-- · 2020-05-12 03:33

It took me some time to figure out the options for mongorestore , after i had kept getting this error for some time .

a) No running instances of mongod .

b) mongorestore -v -host localhost:27017 --dbpath "Actual Path for the Mongo DB- set in config" "Location where the dump is"

Using dbpath , allows to run this command without any running version of mongod . And this resolved my error .

查看更多
登录 后发表回答