1

I am facing this error SyntaxError: syntax error (shell):0. I am using ubuntu. I have tried like this. First open the terminal and type mongo

MongoDB shell version: 2.0.4
connecting to: test
>

after that I have switched to the database I want to create test1 then used the folowing command

./mongorestore -h localhost:27017 -d test1 /home/ratheesh/testdev

I got this error

Wed May 16 12:33:03 SyntaxError: syntax error (shell):0
>

Please help me to fix this issue

0

1 Answer 1

2

mongodump, mongorestore etc. are executable programs and are not supposed to be run from mongo shell. Run the restore command from the command line and after running it start mongo and verify that the data appeared in database.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.