Question

What is the default MonogoDB file location.

Posted March 13, 2017 16.4k views
MongoDB

I upgraded ubuntu and when it rebooted mongodb was no longer running. I can start it manually I just need the location of the db files.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

You need to check your MongoDB configuration file, which I’m not sure where’s located, since you haven’t listed what version of Ubuntu your upgraded from and to.
Usually the database is located in /var/db/mongodb or /var/lib/mongodb

This command should list the path of the databases, if your configuration is in /etc/mongodb.conf

grep dbpath /etc/mongodb.conf

Which version of MongoDB are you running and which version of Ubuntu (both before and now)?

Submit an Answer