Quick MongoDB tip – how far does your oplog go back?
Choosing the right MongoDB oplog size can be difficult, especially if your usage is growing. So here’s quick way to see what the last item in the oplog is. If your down slave or backup is older that this, it won’t be able to resync:
use local
new Date(db.oplog.rs.find().sort({$natural:1}).limit(1).next()["ts"]["t"])
(Taken from this blog post because otherwise it’ll get lost!)
Enjoy this post? You may also like MongoDB Benchmarks