0

Can we sync a mongodb database to another incrementally based on a schedule? Say, once every night at 12 am?

Background: We have a MongoDB replica cluster consisting of 3 instances, all located within one data center. For backup, the company is acquiring another server in a different country. This rises two questions for us.

  1. Does MongoDb allow us to do schedule syncing.
  2. Can the syncing be incremental by not replacing data that is already synced.

We initially thought of adding the new server to the replica set as a passive replica. However, we got input that it will slow down the cluster as the new server will have high latency.

1
  • 1
    What about a Hidden Replica Set Members? In worst case, you can simply stop the backup member and start the mongod only at night time when you like the sync to run. Apart from inital sync, the sync is always incremental. Commented Oct 17, 2022 at 19:32

1 Answer 1

1

As other user wrote, "hidden replica set member" is a solution, but... You should remove voting too. So, that node cannot take part in voting. You may ask why? It's because it's even member of replica set. Replica set should always have odd amount of voting members.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.