MongoExport Too many positional options

点点圈 提交于 2019-12-12 04:37:31

问题


Am trying to run a mongoexport using a remote connection by filtering on date ranges. A very simple query, however, I am running into positional errors issue. I;ve read through most of the posts regarding it, did the epoch conversion etc. But completely hit a block. Hopefully someone here can figure out what I am doing wrong.

Below is my command and the error message:

C:\ mongoexport --host 1.1.1.111:1111 --db IQ -u user -p password --collection CallLog --out   calllog.json --query  '{"Call.StartTime":{"$gte":new Date(1411066005000),"$lte": new Date(1406918805000)}}'
Error parsing command line: too many positional options
try 'mongoexport --help' for more information

We use the authenticationDatabase option when connecting and running queries from mongo. Tried the above using that as well. But same error.

What am I doing wrong here?

Thanks so much in advance.

Regards, Simak


回答1:


resolved this by interchanging the " and ' marks..Didn't realise that those made all the difference.

Thanks!



来源:https://stackoverflow.com/questions/25921183/mongoexport-too-many-positional-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!