[SERVER-28228] Mongodb Restore using wt file is failing Created: 07/Mar/17  Updated: 14/Aug/18  Resolved: 08/Mar/17

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Chaitanya Peddi Assignee: Mark Agarunov
Resolution: Done Votes: 0
Labels: envns, rfi, rpu, trcf, wtc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File SERVER-28228-repair.tar.gz     File WiredTiger.turtle     File WiredTiger.wt    
Operating System: Linux
Participants:

 Description   

We have implemented MongoDB master-slave replication on sunday.

last backup was on sunday , database got corrupted to

we restored deleted files from Mongo data directory using Ext Delete command.

We wanted to restore one collection for which we have WT (wiredtiger) file. We are trying to restore that file using the following commands

and we are getting the following errors

http://www.alexbevi.com/blog/2016/02/10/recovering-a-wiredtiger-collection-from-a-corrupt-mongodb-installation/

wget http://source.wiredtiger.com/releases/wiredtiger-2.7.0.tar.bz2
tar xvf wiredtiger-2.7.0.tar.bz2
cd wiredtiger-2.7.0
sudo apt-get install libsnappy-dev build-essential
./configure --enable-snappy
make
./wt -v -h ../mongo-bak -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -R salvage collection-2657--1723320556100349955.wt
 
Error -
 
./wt -v -h ../mongo-bak -C "extensions=[./ext/compressors/snappy/.libs/libwiredtiger_snappy.so]" -R salvage collection-246--7553069514495955510.wt
[1488888117:36780][13536:0x7f7b633cd740], file:WiredTiger.wt, connection: read checksum error for 4096B block at offset 12288: block header checksum of 1955562709 doesn't match expected checksum of 3146787951
[1488888117:36809][13536:0x7f7b633cd740], file:WiredTiger.wt, connection: WiredTiger.wt: encountered an illegal file format or internal value
[1488888117:36817][13536:0x7f7b633cd740], file:WiredTiger.wt, connection: the process must exit and restart: WT_PANIC: WiredTiger library panic
lt-wt: WT_PANIC: WiredTiger library panic



 Comments   
Comment by Mark Agarunov [ 10/Mar/17 ]

Hello sandipp

I'm sorry the repair attempt was unsuccessful. Unfortunately, this likely indicates that additional files were corrupted. In this situation, my recommendation would be to restore from a backup if that is an option.

Thanks,
Mark

Comment by sandip [ 10/Mar/17 ]

@Mark Agarunov thanks for the response.

We've followed the procedure and used the files given by you still error persist.
Do have any more pointers to solve this?

Comment by Mark Agarunov [ 08/Mar/17 ]

Hello chaidar,

I've attached a repair attempt of the files you've provided. Would you please extract these files and replace them in your $dbpath and let us know if it resolves the issue? Also please note that it is not possible to selectively restore files from a backup, the entire backup must be restored.

Thanks,
Mark

Comment by Chaitanya Peddi [ 07/Mar/17 ]

Hi..plese find attached

Comment by Mark Agarunov [ 07/Mar/17 ]

Hello chaidar,

Thank you for the report. Please note that the method described in the linked blog post is not supported and may lead to further corruption in some circumstances. If you provide the WiredTiger.wt and WiredTiger.turtle files we can attempt a repair of the database, but please keep in mind that this is not a guaranteed fix.

Thanks,
Mark

Generated at Thu Feb 08 04:17:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.