Do i need to execute fsyncLock in MongoDB before dumping with mongodump?

The 2.6 docs was clearly stated that db.fsyncLock()should not be used at startup mongodump:

Do not use mongodump with db.fsyncLock ().

But this information has disappeared due to the 3.0 version of the documentation . In fact, there is no information about locks in documents mongodumpfrom 3.0.

I assume --oplogthere is no need to call when using db.fsyncLock(), but I'm not 100% sure:

Without --oplog, if there are write operations during the dump operation, the dump will not reflect a single point in time. changes made to the database during the upgrade process may affect the output of the backup.

could you help me? Do i need to execute fsyncLock in MongoDB before dumping with mongodump?

thank!

+4
source share
1 answer

I assume that when using --oplog there is no need to call db.fsyncLock ()

Previously, with versions of MongoDB prior to 3.0, you should not call db.fsyncLock()at runtime mongodump, and now you do not need it. The warning about using fsyncc has mongodump been removed at once in several places , so this is not like surveillance but a deliberate change.

The documentation db.fsyncLock()says that

This function locks the database and creates a window for backup operations.

cp rsync. MongoDB Tools - , --oplog :

--oplog mongodump oplog . --oplog mongodump , oplog . mongorestore --oplogReplay , , , mongodump .

: , db.fsyncLock().

+2

Source: https://habr.com/ru/post/1656780/


All Articles