How can I tell where mongoDB is storing data? (its not in the default /data/db!)

Zugwalt picture Zugwalt · Aug 30, 2011 · Viewed 200.3k times · Source

My host came with a mongodb instance and there is no /db directory so now I am wondering what I can do to find out where the data is actually being stored.

Answer

EhevuTov picture EhevuTov · Sep 2, 2011

mongod defaults the database location to /data/db/.

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.