Rails - Where MongoDB (Mongoid) stores db and logs

2019-04-07 23:47发布

I am new to MongoDB and Mongoid and I am using Debian testing(jessie/sid).

When I open /etc/mongodb.conf there is no information about where Mongoid stores db and logs.

It just mentions logpath=/var/log/mongodb/mongodb.log

Also in config/mongoid.yml there is no useful info:

development:
  sessions:
    default:
      hosts:
        - localhost:27017
      database: project_development

How to locate project_development db on disk and logs for that db? Is there a settings somewhere for that?

2条回答
不美不萌又怎样
2楼-- · 2019-04-07 23:59

Databases are under:

/var/lib/mongodb

MongoDB stores all logs (for each database) in one file by default. It is located under:

/var/log/mongodb/mongodb.log


More info :

/etc/mongodb.conf

  • (Using XUbuntu 13.04)
查看更多
孤傲高冷的网名
3楼-- · 2019-04-08 00:13

usually the log files should be at /var/log/mongodb.log or try find / -name mongodb.log.

usually it keeps data at /data/db.

To know more about where does it store data please visit How is the data in a MongoDB database stored on disk?

查看更多
登录 后发表回答