Restoring a MongoDB document from the oplog
In this post, I’m going to insert a bunch of dummy records into a test collection, remove some (accidentally!) and then recover them from the online oplog. First of all, let’s setup a basic directory structure, then start a stand-alone MongoDB instance for the test (Windows environment): C:\Users\Administrator>mkdir d:\TestRepSet\db d:\TestRepSet\log d:\TestRepSet\backup C:\Users\Administrator>start mongod –port 27020 –dbpath