- Reference >
mongo
Shell Methods >- Database Methods >
- db.fsyncLock()
db.fsyncLock()¶
-
db.
fsyncLock
()¶ Forces the
mongod
to flush all pending write operations to the disk and locks the entiremongod
instance to prevent additional writes until the user releases the lock with thedb.fsyncUnlock()
command.db.fsyncLock()
is an administrative command.This command provides a simple wrapper around a
fsync
database command with the following syntax:This function locks the database and create a window for backup operations.