I read in MongoDB's official documentation:
important: db.fsyncLock() may block reads, including those necessary to verify authentication warning: When calling db.fsyncLock(), ensure that the connection is kept open to allow a subsequent call to db.fsyncUnlock(). Closing the connection may make it difficult to release the lock.
In the worst case scenario, I use fsyncLock() which blocks the database but I then suddenly lose a connection to the database because of temporary network failure. In that scenario, I cannot reconnect because fsyncLock() blocks the reader. My database will be blocked forever.
I am now considering shutting down mongodb to do a backup. What is the safest backup solution for single mongod ?