./mongodump -d local -c oplog.rs -q "{ts : { \"\$gte\" : { \$timestamp : { t : 1342670400000, i : 0 } } }}" connected to: 127.0.0.1 Mon Jul 23 13:45:24 DATABASE: local to dump/local Mon Jul 23 13:45:24 local.oplog.rs to dump/local/oplog.rs.bson QUERY: { ts: { $gte: { $timestamp: { t: 1342670400000, i: 0 } } } } Mon Jul 23 13:45:30 0 objects Mon Jul 23 13:45:30 Metadata for local.oplog.rs to dump/local/oplog.rs.metadata.json
vs:
./mongodump -d local -c oplog.rs -q "{ts : { \"\$gte\" : { \"\$timestamp\" : { \"t\" : 1342670400000, \"i\" : 0 } } }}" connected to: 127.0.0.1 Mon Jul 23 13:45:55 DATABASE: local to dump/local Mon Jul 23 13:45:55 local.oplog.rs to dump/local/oplog.rs.bson QUERY: { ts: { $gte: Timestamp 1342670400000|0 } } Mon Jul 23 13:46:01 100/13786540 0% (objects) Mon Jul 23 13:46:01 10038 objects Mon Jul 23 13:46:01 Metadata for local.oplog.rs to dump/local/oplog.rs.metadata.json
Note, the line that starts with "QUERY" above was something I added to print the parsed query object taken from the json input. Notice that in the second output it prints an actual timestamp object, while in the first it's just a document with the field name of "$timestamp"
- depends on
-
SERVER-5677 rewrite json parser
- Closed
- is related to
-
SERVER-6691 mongodumping oplog with timestamp query
- Closed