문제

Is there away to stream certain part of collection in MongoDB or TokuMX from master server to another server? I need to duplicate only certain collection

Or if it isn't possible, are there any other alternative for database that doesn't enforce schema?

도움이 되었습니까?

해결책

MongoDB at least to current version 2.6+ for sure does not support that as build-in functionality. I guess because a replica set using selective replication won't be consistent.

There is a feature called filtered replication in Couch but never tried it: http://wiki.apache.org/couchdb/Replication#Filtered_Replication

다른 팁

The filtered replication is not something that is currently implemented in MongoDB out of the box.

That said, the replication in MongoDB is based on a special collection named "oplog", that you can listen to and do the filter yourself, and in this case implement the filter you want to push data into another cluster. (This will be viewed as 2 different clusters, not a single ReplicaSet)

As a starting point I am inviting you to look a the MongoDB Connector, that allow you to capture the changes in the oplog:

https://github.com/10gen-labs/mongo-connector

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top