We are using mongodb 3.0.2 and our system is managed via MMS
We discover the one of our new DEV environment lost all the content for the /data/db
including the journals, logs and config file.
One thing is the the instance is still up and running in memory.
Does anyone has a solution on how to recover from this situation?
I tried a db.fsyncLock()
that is supposed to flush to data into disk but no luck.
AFAICT, as the files are already opened/memmapped by MongoDB, removing their entry from the filesystem will not prevent MongoDB to still use them (on Unix-like systems, at least). As long as they are not closed and that MongoDB do not need to open other files, things should still be usable. Enough to start doing some dumps.
As an experiment, I populated a newly installed MongoDB 3.0.2 instance with 2M documents. Stopping it, restarting it, and removing the
data
folder -- before having even accessed the collection. Finally I was able tomongodump
that collection without any issue: