Reputation: 545
I'm tring another aproach. Full dump and the daily dump of new data using:
oid=$(mongo --quiet --eval 'ObjectId.fromDate(ISODate("2017-03-29 00:10:20"))')
mongodump -q "{_id:{$gt:$oid}}" -d dbname --collection name_data
But I'm getting:
Failed: error parsing query as json: invalid character ':' looking for beginning of object key string
Upvotes: 0
Views: 360
Reputation: 545
The first $ needs to be escaped:
mongodump -q "{_id:{\$gt:$oid}}" -d dbname --collection name_data
Upvotes: 1