How can I tell where mongoDB is storing data? (its not in the default /data/db!)
the default database location of mongod is /data/db/.
The following statement you will be follow, If you run ps -xa | grep mongod and you don’t see a –dbpath which explicitly tells mongod to look at that parameter for the db location and you don’t have a dbpath in your mongodb.conf, then the default location will be: /data/db/ and you should look there.
The configuration file is say what ?
$ grep dbpath /etc/mongodb.conf
just you want to try this one, your database files will be present on the list:
$ sudo lsof -p `ps aux | grep mongodb | head -n1 | tr -s ' ' | cut -d' ' -f 2` | grep REG
It’s my default installation of (Ubuntu 11.04) /var/lib/mongodb/*
Notice :for that /var/lib/mongodb/mongod.lock file holding mongod PID for convenience, however it is located in the data directory – which we are looking for…