Reputation: 31
Can't find my data base path in mongoDB.
I really need to know where my data is stored on my Mac OSX 10.7
And when I change my DBpath it keeps telling me that DBpath is not defined. (I am using homebrew)
Thank you in advance.
Upvotes: 2
Views: 259
Reputation: 65323
You should be able to find the dbpath used by running the following command in the mongo JS shell:
db.serverCmdLineOpts()
Look for a parsed setting for "dbpath".
Upvotes: 0
Reputation: 26012
By default mongo configurations are stored on the following path.
/etc/mongod.conf
You can find the dbpath in the following file. By default it is :
/data/db or c:\data\db
You can change the dbpath using the following command
mongod --dbpath /data/newpath
Upvotes: 2