Home > OS >  Replicated single Database in mongoDB
Replicated single Database in mongoDB

Time:07-14

I want to replicated a single database of a mongoDB-Server. There are four databases on the server:

Server A to replicated Server B
database 1a database 1b
database 2a database 2b
database 3a --------------> database 3b
database 4a database 4b

Only the database 3a should be replicated to Server B.

How can I do it? Is it possible with the normal replication configuration (https://www.mongodb.com/docs/manual/replication/) and if the answer is yes, how?

I hope you can help. Thank you in forward.

CodePudding user response:

Short answer: this is not possible with Replication.

Long answer: Perhaps is would be possible with some crazy setup of a Sharded Cluster, because sharding is enabled/disabled per database.

CodePudding user response:

Yes, it's possible... Change streaming is the solution. So, you copy changes of one database (or collection) to other server.

  • Related