Trouble running mongorestore command

Hi, I am having trouble running the mongorestore command. I am using the command line:

mongorestore --drop --gzip --uri mongodb+srv://mflix-rp1ap.mongodb.net/test

and recieve the error:

Failed: mongorestore target ‘dump’ invalid: GetFileAttributesEx dump: The system cannot find the file specified.

Hello KevinMichaelCamp,

Thanks for the note. Make sure you specify the directory where the binary data is. For example, you have:

mongorestore --drop --gzip --uri mongodb+srv://mflix-rp1ap.mongodb.net/test

But you should have:

mongorestore --drop --gzip --uri mongodb+srv://mflix-rp1ap.mongodb.net/test data

Make sure to run this command from the mflix-python directory - I hope this helps!

Matt

Thank you very much Matt, I was running it from outside the mflix-python directory and without the m220student:m220password@ preceeding the URI. Now it works!

2 Likes