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 to0
. If your node is never going to be used as master nor queried, you can also setbuildIndexes
tofalse
. 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 themongodump
andmongorestore
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.
精彩评论