I\'ve installed the mongodb 2.0.3, using the mongodb-10gen debian package. Everything went well, except the service which is installed by default is not starting up when com
I was bored of this problem so I decided to create a shell script to restore my mongo data base easily.
#!/bin/sh
sudo rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo service mongodb start
http://ideone.com/EuqDZ8
just re-installed mongo and it worked. No collections lost. Easiest solution atleast for me
On my ubuntu server, just run:
sudo rm /var/lib/mongodb/mongod.lock
mongod --repair
sudo service mongodb start