Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (50.2k points)

I have implemented the following code:

mongoexport -h db.mysite.com -u myUser -p myPass -c myCollection

But the output is:

ERROR: too many positional options

Can someone guide me where I am wrong?

1 Answer

0 votes
by (108k points)

You need to add double quotations before writing the query, refer the following code:

mongoexport ... --query "{field: 'value'}" ...

Note: If you are using MongoDB on windows then add double quotes but if you are using mac then you have to add single quotes.

Related questions

Browse Categories

...