1

I have 2 databases in my mongo DB namespace, lets name them db1, db2 and db3 which are on the same dbpath. Is it possible to configure mongo db replica set in that way that db3 wont be replicated across secondaries?

If yes, how?

2 Answers 2

3

No, to the best of my knowledge this is not possible. A replica set member is identified by a hostname and port, and there are no settings to control which databases are included. See Replica Set Configuration in the MongoDB manual.

You could create a separate MongoDB server instance configured on a different port (and using a different dbpath) to hold the db3 data, although this would obviously complicate your server setup.

1
  • I was afraid that this might work like this - as I did not find anything in manuals. Jan 30, 2013 at 17:51
0

MongoDB replication is handled by host and port, which is per-mongod-process.

The way to do this would be to run db3 run in another mongod process, which runs on a different tcp port.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .