Created
June 16, 2011 10:55
-
-
Save dqminh/1029041 to your computer and use it in GitHub Desktop.
mongodb-restart
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
#!/bin/bash | |
mongo_path=/var/lib/mongodb | |
sudo rm $mongo_path/mongod.lock | |
sudo -u mongodb mongod --repair --dbpath=$mongo_path | |
sudo /etc/init.d/mongodb restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment