开发者

mongoDB replication with offline nodes

Is it possible to set up mongoDB replica set with following scenario (if it is,how):

  • 2 servers always online running mongodb, one of them holds the main node, the other one a rescue copy;

  • n computers each of them running mongodb, occasionally connected to internet, holding nodes which need synchronizing with main node, when they 开发者_运维问答go online.


  • Backup only. In order to do this, you'll have to specify the priority of this node to 0. If your node is never going to be used as master nor queried, you can also set buildIndexes to false. More informations here.

  • Intermitent slave. Due to limitations (mainly on the oplog queue), you can't have a slave halted for a very long time if you have many writes on your MongoDB, see here. However, you can use the mongodump and mongorestore tools directly over network or by script + sync the backup file. More informations here. Note that a restore will bring a db or collection in a server and recreate the indexes completely (if you restore the system.indexes collection too) which can take some time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜