[英]Can 2 MongoDB instances running on the same server point to the same data folder ?
I am in the process of upgrading my MongoDB replica set from 2.6 to 3.2. 我正在将MongoDB副本集从2.6升级到3.2。 We are planning to create another replica set on the same set of machines as an option to fallback in case something goes wrong.
我们计划在同一台计算机上创建另一个副本集,以备不时之需以备不时之需。 In this context, I am trying to find out if the new mongod instance that i would install (on each of these servers to form a replica set) can point to the already existing data files folder being used by the live mongod instance ?
在这种情况下,我试图确定我将安装的新mongod实例(在这些服务器中的每一个上以形成副本集)是否可以指向该活动mongod实例正在使用的现有数据文件文件夹? Or do i have to take a dump and restore via mongodump/mongorestore ?
还是我必须转储并通过mongodump / mongorestore恢复?
Thank you !! 谢谢 !!
Yes, you can do that if you are planning to upgrade your instance to 3.2 without upgrading to WiredTiger engine. 是的,如果您打算将实例升级到3.2而无需升级到WiredTiger引擎,则可以这样做。 If upgrading to WiredTiger enine, than you need to reindex your data as MMAP and Wiredtiger engines are not compatible.
如果升级到WiredTiger引擎,则需要重新索引数据,因为MMAP和Wiredtiger引擎不兼容。
To run two instances of mongoDB using same data: 要使用相同的数据运行两个mongoDB实例:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.