We have a 3 node replica set. We take backups from secondary with mongodump. Our customer said that it's ok too loose 10 hours of data in worst case.

So we decided we don't need point in time recovery --oplog (oplog.bson).

Is this correct in our use case with 10 hours of data loss acceptable?

Is oplog the same as MySQL binary logs?


Yes. OPlog is kind of the same as MySQL binary logs as both are used to sync data to secondary and point in time recovery.

You can use mongodump without --oplog option. You will only loose current writes in your backup. As you have a 10 hour window it wouldn't be an issue.

In this scenario I recommend you to use one of your replica set with slaveDelay.

| improve this answer | |
  • Why would you recommend slaveDelay for this scenario? I think it would be preferable to backup from a replica set member that doesn't have any extra delay applied, even if some data loss is acceptable. – Stennie Sep 28 '15 at 0:28
  • I recommend it not just for backup . As your primary and secondary have sync .If in worst case on primary you run delete command by mistake It will sync to secondary and you data will be lost within few one minute. Having one replica node on slave delay will save you from human errors. – Gagan Sidhu Sep 28 '15 at 5:12
  • 1
    That's what backups are used for, right? Using fs snapshots is by far the better solution. – Markus W Mahlberg Sep 30 '15 at 17:09
  • But snapshot again have dependency over --journaling .If Journaling is not enabled then you have to lock syncing to core data files as snapshot use block level copy. – Gagan Sidhu Oct 1 '15 at 11:40
  • If you have disabled the journal you are also accepting that an unclean shutdown on a single node will require you to re-sync that node (you don't want to try repairing it to a potentially inconsistent state from your other replica set nodes). I would strongly recommend not disabling the journal, and use snapshots where possible for the fastest backup & recovery time. – Stennie Oct 8 '15 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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