function StartSource { # Datastore Protection /usr/local/bin/mongo admin --eval "printjson(db.fsyncLock())" &>/dev/null # Export Protection # /usr/local/bin/mongodump -o /data/dump &>/dev/null echo } function EndSource { # Datastore Protection /usr/local/bin/mongo admin --eval "printjson(db.fsyncUnlock())" &>/dev/null echo }