title: Is it necessary to perform an fsyncLock in MongoDB before creating a dump with mongodump?
body: <p>In the <a href="https://docs.mongodb.com/v2.6/reference/program/mongodump/" rel="nofollow noreferrer">2.6 docs</a> it was explicitly stated that <code>db.fsyncLock()</code> should not be used when running <code>mongodump</code>:</p>
  
  <blockquote>
    <p>Do not use mongodump with db.fsyncLock().</p>
  </blockquote>
  
  <p>But this information has disappeared since the <a href="https://docs.mongodb.com/v3.0/reference/program/mongodump/" rel="nofollow noreferrer">3.0 version of the docs</a>. There is actually no info at all regarding locks in the <code>mongodump</code> docs from 3.0.</p>
  
  <p>My guess is that, when using <code>--oplog</code> it is not necessary to call <code>db.fsyncLock()</code>, but I'm not 100% sure:</p>
  
  <blockquote>
    <p>Without --oplog, if there are write operations during the dump
    operation, the dump will not reflect a single moment in time. Changes
    made to the database during the update process can affect the output
    of the backup.</p>
  </blockquote>
  
  <p>Could you help me here? Is it necessary to perform an fsyncLock in MongoDB before creating a dump with mongodump?</p>
  
  <p>thanks!</p>