Last active
January 2, 2018 17:11
-
-
Save walbinjr/0d682cd95c1f8e0e60ed52d37f5a2dec to your computer and use it in GitHub Desktop.
Fixing MongoDB against unclean 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
# Execute with sudo | |
grep -i dbpath /etc/mongod.conf | |
# dbpath=/var/lib/mongodb | |
rm /var/lib/mongodb/mongod.lock | |
mongod --repair --dbpath /var/lib/mongodb | |
chown -R mongodb:mongodb /var/lib/mongodb | |
service mongod restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment