Mongo DB repair not working how to save databases without mongodump

376 views Asked by At

I had recently a bug with one collection among my databases. Tried to fix it by myself and then I ran dbmongo with --repair and it never worked with the most recent mongo (6.0 version) . One of the error i get is the following

"t":{"$date":"2022-10-23T10:34:56.814+03:00"},"s":"E",  "c":"STORAGE",  "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":0,"message":"[1666510496:814423][245805:0x7f99fc399c80], file:collection-591-2337122025107551252.wt, WT_CURSOR.next: __wt_block_read_off, 296: collection-591-2337122025107551252.wt: potential hardware corruption, read checksum error for 16384B block at offset 4537556992: calculated block checksum doesn't match expected checksum"}}

I tried to fix this error by removing the collection. Then it produces another error "aborting after invariant() failure":

{"t":{"$date":"2022-10-23T11:13:48.644+03:00"},"s":"F",  "c":"-",        "id":23081,   "ctx":"initandlisten","msg":"Invariant failure","attr":{"expr":"buildUUID","msg":"collection: mydatabase.birds_collection:_id_","file":"src/mongo/db/catalog/index_catalog_impl.cpp","line":169}}
{"t":{"$date":"2022-10-23T11:13:48.644+03:00"},"s":"F",  "c":"-",        "id":23082,   "ctx":"initandlisten","msg":"\n\n***aborting after invariant() failure\n\n"}
{"t":{"$date":"2022-10-23T11:13:48.646+03:00"},"s":"F",  "c":"CONTROL",  "id":6384300, "ctx":"initandlisten","msg":"Writing fatal message","attr":{"message":"Got signal: 6 (Aborted).\n"}}

Then no matter how many time i run it i always get this error. Everything i read online consists in running the --repair command

I would be glad is there any way to make it work again even with some broken collections. If there isn't any way how can I backup my collections ?
I tried mongodump but I cannot use since mongo will not start because of this issues. Is there another manual way to backup my file of collections ?
I tried to copy paste them in a new folder but they don't appear in mongo. I just want to save as many collections as possible. I don't have a good backup to use

0

There are 0 answers