Mongorestore: command not found

is anyone able to help why I got the above error?
I cna connect to the cluster fine but when try to import data that’s where the problem start

Appears to be a path problem to me
Does your environment variable path have mongodb path included?

1 Like

yeah, have added the path. and reran the mongore restore command but now it came up with

2019-06-23T11:24:56.413+1000 see mongorestore --help for usage information
2019-06-23T11:24:56.413+1000 Failed: mongorestore target ‘dump’ invalid: stat dump: no such file or directory

do I need to create a dump directory in the mflix directory on my machine?

it worked now.

made a mistake with command line argument

1 Like

can someone mention what the error is as I am getting the same error but I am unable to identify what is wrong with the path

tried following commands

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-zksx5.mongodb.net/sampleMflox?retryWrites=true&w=majority ~/Desktop/mflix-java/mflix/data/

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-zksx5.mongodb.net/sampleMflox?retryWrites=true&w=majority /data

mongorestore --drop --gzip --uri mongodb+srv://m220student:m220password@mflix-zksx5.mongodb.net/test?retryWrites=true&w=majority data

For all the above I am getting same error

Here path means environmental variable PATH.You need to update your path to include mongo bin
It is not issue with the path of your dir in the command you are using
All 3 commands are failing as it is unable to find mongorestore
Can you run just mongorestore without any options at your command prompt.It will fail with same error

1 Like