I try to shutdown mongoD in order to make a backup. However when I send service mongod stop
it totally failed Stopping mongod:[FAILED]
I took a look on mongodb logs and there is nothing about shutdown...
I've got important data on this DB and i don't want to kill anything, so as i'm a beginner in mongoDB, I prefer to ask here what to do before destroy everything.
I was thinking about kill the process of MongoD, make my backup with mongodump and restart MongoD, but i'm not sure that it will work.
Thanks for helping.
For my MongoDB 3.0 install, the problem with stopping was caused by a comment field in the /etc/mongod.conf file:
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
This caused a problem with the awk command in /etc/init.d/mongod that defines the PIDFILEPATH since the comment text became part of the path, which then meant the mongo_killproc would not work.
I fixed this by editing the mongod.conf to move the comment to a separate line and now all is good (I did not have to change the quotes around $PIDFILEPATH either)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With