[Xapian-discuss] Rebuilding corrupt databases from .DB files.

Graham Jones your-name-here at grahamjones.org
Mon Apr 16 01:15:08 BST 2012


We've had some catastrophic filesystem failures that have left us with corrupted databases with empty files and no backup for about 15TB of our data. Recreating the 15TB from source data backups is possible but will take a very very long time. 

I'm hoping that, given all of the .DB files are still intact, there my be some way to extract their contents and rebuild the other tables. 

This is one of our 800 databases that has been corrupted and you can see which files are empty:
drwxr-xr-x 1152 search search       40960 Apr 15 23:06 ..
drwxr-xr-x    2 search search        4096 Jan 31 17:39 .
-rw-r--r--    1 search search           0 Jan 31 17:39 iamchert
-rw-r--r--    1 search search           0 Jan 31 17:39 position.baseB
-rw-r--r--    1 search search  2191785984 Jan 31 17:39 position.DB
-rw-r--r--    1 search search           0 Jan 31 17:37 position.baseA
-rw-r--r--    1 search search           0 Jan 31 17:37 termlist.baseB
-rw-r--r--    1 search search  3953393664 Jan 31 17:37 termlist.DB
-rw-r--r--    1 search search           0 Jan 31 17:37 record.baseB
-rw-r--r--    1 search search 10681057280 Jan 31 17:37 record.DB
-rw-r--r--    1 search search           0 Jan 31 17:37 termlist.baseA
-rw-r--r--    1 search search           0 Jan 31 17:15 postlist.baseB
-rw-r--r--    1 search search  5559812096 Jan 31 17:15 postlist.DB
-rw-r--r--    1 search search           0 Jan 31 17:15 record.baseA
-rw-r--r--    1 search search           0 Jan 31 17:10 postlist.baseA

I have already tried recreating the .baseA and iamchert files from copying similar databases (as these seem to be identical save for the UUID in iamchert) but can't get it to be usable without the .baseB files.
I've also tried using copy database but that doesn't work.

Can someone tell me what is in the .baseB files and if their contents can be recreated from the .DB files if I were to write something that can read and process the files at a low level.


More information about the Xapian-discuss mailing list