mongodump using --query argument gives "positional arguments not allowed" error

Viewed 4499

I'm using mongodb 2.6 and trying to create a dump using the query option gives "positional arguments not allowed".

I am trying to get all the products who parameter's timestamp is between specified range and whose id is of any of the specified format.

 mongodump --host 10.xx.xxx.xx:xxxx --db test --collection products --username abc --password uvw --query '{"parameterList":{$elemMatch:{ "paramName":"TimeStamp","paramValue":{$gte:"20160620000000",$lt:"20160724000000"}}},"parameterList.paramValue": {$in:[/SPC126/,/CSC234/]}}' --authenticationDatabase test --out "c:\New folder\dump"

document structure

 { 
   "_id": ObjectId("590074c362f41f15144996fa"),
   "product": "device1",
   "parameterList":[{"paramName":"TimeStamp",
                     "paramValue":"20160731000700"},
                    {"paramName":"Id",
                     "paramValue": "SPC126332"}]
  }
1 Answers
Related