Cant install Mongorestore

I am trying to install mongorestore on windows 10 and I always get an error, I tried all the suggestions in the form and I still get errors.

If anyone now how to help me with that issue, I would really appreciate it.

It seems to be a path issue
Try as suggested
You are already in bin directory
./mongorestore (paste rest of the command)

i Ramachandra,
Thanks, but I tried all options and still I cant make the connection,


c:\Program Files\MongoDB\Server\4.0\bin>mongorestore --drop --gzip --uri mongodb+srv://m220student:password@mflix-YOUR CLUSTER NAME.mongodb.net/test?retryWrites=true D:\MongoDBUni\mflix-js\data

I think this is due to incorrect path. change the directory to c:\Program Files\MongoDB\Server\4.0\bin where the mongodb is installed. Give your cluster name . In the end give the path where your m-flix is present(for me D:\MongoDBUni\mflix-js\data). It worked for me.

no quotes before mongodb

Hi Anuja,
Thanks for helping me, I tried what you suggested but I still can’t connect to the database, I attached screenshot with the few attempts that I took.


Please run the mongo.exe in bin and try mongorestore command in command prompt

Hi Anuja,


I ran mongo.exe, and then I open cmd and ran the mongorestore, I getting the same error

Try give as below after changing yourclustername and target directory where mflix-js is present

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-YOURCLUSTERNAME.mongodb.net/test?retryWrites=true D:\MongoDBUni\mflix-js\data

I already did it before and it didn’t work.

Than I tried there recommendation to type .\mongorestore and the rest as you suggested with the data directory at the end and I get that error :

Try to include your uri string in quotes
mongorestore can be invoked from anywhere but since you are having path issues it is not working
Try different options
Instead of running it from mongo bin dir give full path of bin
go to your dir where your data dir resides
Then run

C:\Program Files\MongoDB\Server\4.0\bin\mongorestore (paste rest of the command)

Ok, thanks
I will try your suggestions, I hop it will work :+1:

Hi Ramachandra,

I tried almost every option that offered here at the chat and still I can’t importing the data. I attached screen shots from all attempts that I took.

I don’t know what to do anymore :frowning:

May be course instructors can help you with loading data
Please check this

Mongorestore unknown option “uri”

If short srv string does not work use long string as suggested in above

Hi Ramachandra, Anuja

Thanks for your help,

It’s worked :+1: