From a bash backup script I want to call db.fsyncLock()
, then execute other commands (fs snapshotting) and later db.fsyncUnlock()
non-consecutively over the same connection, since it is advised as best practice.
I tried named pipes, but mongo shell crashes when having something piped via stdin. How can I achieve this?