问题
Suppose I have a Mongo replica set (a primary and few secondaries) with two databases: db1 and db2. One secondary Mongo crashed and lost its data. Now when this Mongo restarts it will recover and copy both db1 and db2 from the primary.
Since such recovery takes a lot of time I would like this secondary Mongo to copy only db1 (but not both db1 and db2) upon recovery. Can I do it with Mongo 2.4.6 ?
回答1:
MongoDB does not yet have the capacity for selective replication.
Feel free to open a JIRA: https://jira.mongodb.org/secure/Dashboard.jspa there is probably already one but a Google search by me can't bring it up.
Of course, one option here, to sped things up, is to actually physically copy the data from one location to the other without waiting for MongoDBs replication to take hold.
As @Stennie mentions, this is actually the JIRA for selective replication: https://jira.mongodb.org/browse/SERVER-1559
来源:https://stackoverflow.com/questions/21703885/how-to-do-selective-mongo-recovery