Mongodump --uri "mongodb+srv://"

I am new to Mongo DB, Following tutorial videos only.

While running the command
mongodump --uri “mongodb+srv://”

I am getting below error:
uncaught exception: SyntaxError: unexpected token: identifier :

Please help me to fix it. what we have to write in
our cluster?

Welcome to the community!

Please show us a screenshot of how/where you ran the command
You may be already at mongo prompt
You should run mongodump at os prompt like #,$
Sometimes fancy quotes also cause issues

Thank you for your response. First I have set the connection then, then I tried to export the data as per tutorials.
I don’t know where I am wrong, Please help me to fix it.

Please exit mongo prompt and run the command at your os prompt(ruchimanu$)

Thanks Ramachandra, Now I am able to export the data, but next command is not working again. How I will come to know, step by step whether I have to run commands at os prompt or mongo prompt. Please help me

Hi @Ruchi_Sharma
M001 is not command.

cd is command.

Please remove prefix M001 and try.

Screenshot 2021-04-13 at 3.05.26 PM

  1. M001 is my project name. I was thinking to store the data to M001 folder.
  2. Now I am able to get into dump folder, but unable to run other commands. How to access .bson and .json file from sample supplies that is under dump folder?

Hi @Ruchi_Sharma, you don’t have to put the folder name at the beginning of the command, just simple “ls” would do the job.

Thanks. Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.