问题
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