我如何知道mongoDB在哪里存储数据? (它不在默认的/ data / db!) [英] How can I tell where mongoDB is storing data? (its not in the default /data/db!)
本文介绍了我如何知道mongoDB在哪里存储数据? (它不在默认的/ data / db!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的主机有一个mongodb实例,没有/ db目录,所以现在我想知道我可以做些什么来确定数据实际存储在哪里。
默认数据库位置为
/ data / db /
。 如果您运行 ps -xa | grep mongod
,并且没有看到 - dbpath
,它显式地告诉 mongod
请查看该数据库位置的参数,并且在 mongodb.conf
中没有 dbpath
默认位置将是: / data / db /
,你应该看看那里。
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.
解决方案
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.
这篇关于我如何知道mongoDB在哪里存储数据? (它不在默认的/ data / db!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文