Mirrored MongoDB data through DDT
When MongoDB needed data recovery due to some problems, there was a problem with the WAP platform and we couldn't recover through the platform. We can use the following methods to recover the data through human intervention.
-
Build a new MongoDB
-
Download backup data on 47019
mongodump --host <host>:47019 -u <user> -p <password>--authenticationDatabase <authdb>
-
Restore downloaded backup data to a new cluster
mongorestore --host <host>:<port> -u <user> -p ****** --authenticationDatabase <authdb> dump
-
Download incremental Oplog from 57019
Find the corresponding incremental backup Oplog in the 57109 cluster through the cluster ID
mongodump --host <host>:57019 -d wap -c oplog669cf3fd3d4d3b380bf5206a -u <user> -p <password> --authenticationDatabase <authdb>
-
Specify the timestamp, re-apply Oplog, and restore the data to the specified point in time.
mkdir empty mongorestore --host <host>:<port> -u <user> --authenticationDatabase <authdb> \ --oplogReplay \ --oplogFile dump/local/oplog.rs.bson \ --oplogLimit ******** \ empty/