Unable to import atlas cluster data to local Mongodb shell

Hi I am unable to get data from atlas cluster to mongo shell in my local machine, trying with below command
mongoimport --uri=“mongodb://:@sandbox.****.mongodb.net/sample_training” --drop trips.json

uncaught exception: SyntaxError: unexpected token: identifier :

Tried removing “” as well, when I try that it is not doing anything like below

Can you guys please help me with this ?

Hi @Revanth_Voduru, welcome to the community.
Can you please make sure that you are not running mongoimport from the mongo shell?
You are supposed to run this command from the Command Prompt/Terminal directly.

In case you are already running it in the correct place, please post a screenshot of the error you are getting.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

Hi @Revanth_Voduru I am not sure if I understand your question so please let me indicate the next:

So now, if you want to import the backup to your local mongodb, you only have to use mongoimport with your local path database ( /data/db )

1 Like