'Mongodb --repair throws a core dump - how do I recover the raw data?
We have a stand-alone MongoDB instance running the latest release via docker.
We had a severe crash yesterday, when one of analysts dropped a database while a separate process attempted to insert a document into one of the collections of the database. Presumably this led to a race condition, but regardless, MongoDB crashed.
We restarted MongoDB, but it kept crashing. We then ran the --repair command and MongoDB threw a core dump.
I can’t find any actual documentation around the --repair command, is it possible to rebuild the database without building the indexes? We just need to recover the data.
My question is how do I recover the raw data from the WiredTiger files:
collection-138-3885477232820226262.wt
Is this just BSON? Is there a way to extract the raw data so I can just re-insert it into a fresh mongodb instance?
thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
