Intellipaat 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 (107k 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

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...