Skip to content

Instantly share code, notes, and snippets.

@dqminh
Created April 5, 2011 09:13
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/903298 to your computer and use it in GitHub Desktop.
Save dqminh/903298 to your computer and use it in GitHub Desktop.
#!/bin/bash
#replace /var/state and /var/state/mongodb with your proper path
sudo rm /var/state/mongodb/mongod.lock
sudo -u mongodb mongod --repair --dbpath=/var/state/mongodb
sudo /etc/rc.d/mongodb restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment