Created
February 25, 2011 21:10
-
-
Save jeffgca/844500 to your computer and use it in GitHub Desktop.
From boxed ice, how to get the last oplog date.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment