Skip to content

Instantly share code, notes, and snippets.

@dqminh
Created June 16, 2011 10:55
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 dqminh/1029041 to your computer and use it in GitHub Desktop.
Save dqminh/1029041 to your computer and use it in GitHub Desktop.
mongodb-restart
#!/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