Created
November 13, 2011 19:20
-
-
Save joar/1362530 to your computer and use it in GitHub Desktop.
MongoDB repair - Recover from faulty MongoDB shutdown
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # MongoDB repair - Recover from faulty MongoDB shutdown | |
| # By Joar Wandborg <http://wandborg.se> | |
| # | |
| # Tested on Ubuntu Oneiric 11.10 | |
| sudo rm /var/lib/mongodb/mongod.lock | |
| sudo mongod --repair | |
| sudo service mongodb start | |
| sleep 1 | |
| sudo service mongodb status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment