I would like to compare and sync collections manually and automatically. By syncing, I mean adding new documents to the target DB and removing obsolete documents from it.
I have found 2 tools, that seem to do the job, at least manually:
I don’t think it’s necessary but I’ll give an example: 2 mongoDB servers A,B which in the beginning are synced with some blogs. On server A new blogs are being added or removed. I would like to know which of them were added and which were removed in comparison to server B. Then accordingly add them or removed them from B. Simple.
Replica set already sync the data from primary to secondary servers.
No, I don’t mean replication.
@coderkid: I did not tried it yet, but the idea now is to use mongoexport to export the collections in subsequent times in JSON format and compare the JSON files. Then import or remove the documents from the other server depending on the diff file.