Mongodb – It is possible to take incremental backup in mongoDB Shard cluster? without opsmanager

mongodbmongodb-3.6

Shard MongoDB Cluster:

  • 3-router
  • 3-config
  • 2-shard (3-replica's per shard)

We are tring to take incremental backup for every one hour. We gone through few google links, but no luck. As per our above setup, to achive incremental backup we need to take mongodump with oplogs seperatly from config, shard1 and shard2 secondary servers and we will store it in s3. But the problem is with restoration part. To restore, all those dump (config, shard1 and shard2) needs to be downloaded from s3 and restore it to its specific replicaset. which means config dump to config and shard dump to shard.

Is this the correct process or we have any other option to take incremental backup with single query?

Thanks

Best Answer

Consider using Percona tool if you are using MongoDB version above 3.6. Taking dump of individual shards and trying to stitch it together while restoring is not advisable.