Syncing Collections from different servers

Hi all,

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:

Are there any other ways to do it? If possible by using free tools.

What is the purpose of this?

Replica set already sync the data from primary to secondary servers.

However if you want an offline copy I would recommend to use

and check this page out

Thanks for the answers!


What is the purpose of this?

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.

Thanks. Your explications help provide a better answer. I think you will like what the change stream API provides. Take a look at

Thanks. It looks interesting.