What does “too many positional options” mean when doing a mongoexport?

后端 未结 14 1679
暖寄归人
暖寄归人 2020-12-05 09:27

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

But the response I get is:

ERROR: too many positional options

14条回答
  •  悲哀的现实
    2020-12-05 10:01

    I was also stuck in same situation and found what was causing it.

    1. Make sure you are exporting in CSV format by adding parameter --type csv
    2. Make sure there are no spaces in fields name, Example: --fields _id, desc is wrong but --fields id,desc,price is good

提交回复
热议问题