Skip to content

Instantly share code, notes, and snippets.

@antlypls
Created September 8, 2011 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antlypls/1203070 to your computer and use it in GitHub Desktop.
Save antlypls/1203070 to your computer and use it in GitHub Desktop.
repair mongodb if it's not started after crash
#!/bin/sh
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair
sudo service mongodb start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment