[root@mongolinux Log_Files]# mongodump --port 27088 --host mongolinux --db local --collection oplog.rs --out "/Results/2/2843" --query "{ts:{\$gt:Timestamp(1568904578,1)}}" -u mo_user -p'test!12' --authenticationDatabase 'admin'
2019-09-19T20:41:41.823+0530 Failed: error parsing query as Extended JSON: invalid JSON input
Hi,
The JSON format is quite particular about quotes. Each field name must be surrounded by double quotes. Single quotes or no quotes are not actually valid JSON.
Also, Timestamp(...)
is not valid JSON either, since it is a function call.
In your example, the --query
should be following the extended JSON format specifically the timestamp format, so it should be like:
--query '{"ts": {"$gt": {"$timestamp": {"t": 1568904578, "i": 1}}}}'
Note the double quotes surrounding the field names and the single quote surrounding the whole query.
Best regards,
Kevin
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/75142b05-1637-478b-a976-03e48535b9ec%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mongod...@googlegroups.com.