I have an instance with 10 databases. I’d like to restore 1 of the 10 databases back to a point-in-time, but to another instance.
I take a weekly full using mongodump (with –oplog), plus daily diffs using
mongodump (-d local -c oplog.rs --query '{ "ts" : { "$gt" : {"$timestamp":{"t":'${EPOCH}',"i":0}} } }')
to collect the last 25 hours of oplog. The variable EPOCH is set to a datetime 25 hours ago.
I can restore all 10 databases to a point-in-time, but how do I restore just 1 of the 10?
I can restore the full, but rolling forward has problems.
I tried to use oplogReplay, but it failed when it attempted to roll forward as there were entries for the other 9 databases. I can’t seem to skip over them.
1