0

Here is the official command for backing up the database from cloud.mongodb.com

enter image description here

When I run it in shell with the appropriate password and correct db name I get the following error:

[js] SyntaxError: missing ; before statement @(shell):1:12

The database name is school

I've searched for the error and only found the following: MongoDB SyntaxError: missing ; before statement @(shell). It says that the db name should begin with an underscore or a letter which it does in my case.

What am I missing?

EugenSunic
  • 13,162
  • 13
  • 64
  • 86
  • You looked at the wrong answer. You are attempting to run in the "mongo shell" when you are **supposed** to run in the **OS shell**. There's even an [FAQ on the manual page](https://docs.mongodb.com/manual/reference/program/mongoexport/#synopsis) because so many people do this. - *"Run mongoexport from the system command line, not the mongo shell.*" – Neil Lunn Nov 18 '18 at 21:01
  • OMG, how could I have done that... Tnx immensely for pointing it out. – EugenSunic Nov 18 '18 at 21:10

0 Answers0