This is a continuation of the earlier topic Recover deleted collection
I am able to recover the inserted records. Is there a way to recover the updated records also?
I tired the following:
db.oplog.rs.aggregate([
{$match: {op: 'u', ns: 'mydb.mycol'}},
{$replaceRoot: {newRoot: '$o'}},
{$merge: { into: {db: "mydb", coll: "mycol2"}, on: "_id", whenMatched: "replace", whenNotMatched: "insert" } }
])
But no luck, it says:
MongoServerError: The $v update field is only recognized internally
Kindly advise.