[Mediawiki-l] problems with recovery (Debian)

John W Foster johnwfoster at verizon.net
Wed Feb 20 04:38:26 UTC 2008


On Tue, 2008-02-19 at 23:11 -0500, Dan Saperstein wrote:
> Hi all - been stumped by something since my server's hard drive died  
> over the weekend, was hoping someone here could offer some sage advice  
> on my predicament.
> 
> I apologize in advance for the length of this email - I'm trying to  
> provide as many details as I can with the hopes that someone would be  
> able to point me in the right direction, so if you're not a techie or  
> SQL junkie, don't bother reading any further  ;)
> 
> Basically, here is my story - was running a remotely-hosted Debian  
> (Etch) dedicated server with latest PHP5/Apache2/MySQL5 installation,  
> as well as MediaWiki 1.11.0 (i'm 99% sure this was the on the server,  
> but it could have been 1.10.x).  The wiki page uses the SQL database  
> named "wikidb".  Daily, at 4am, we've had a cron job that took all the  
> files in an SQL folder (for example, /var/lib/mysql/wikidb ), which  
> were .MYI, .MYD, and .frm files of the various tables and bzipped  
> them, and my computer at home connected every morning at 5am via FTP  
> to download them.  I've kept a week's worth in constant rotation for  
> over a year.  So, I figured if we ever had a bad crash, we'd be  
> covered.  Not the .SQL files that would have been nicer to have, but  
> at least something.
> 
> Having not really paid much attention to this daily archive, I didn't  
> notice that it was only about 600 KB in size, despite several hundred  
> pages.  I figured it compressed well.  Maybe not...
> 
> Sunday, our hard drive basically seized, and has been declared dead by  
> our hosting company.  New HD installed, fresh Debian (Etch), latest  
> PHP5/Apache2/MySQL5 once again.  Un-zipped and copied the backup SQL  
> files to their proper location, and phpmyadmin showed the tables as  
> being in place.  Looked good.
> 
> So I tried a fresh install of MediaWiki 1.11.1, using the same info I  
> had before (thought this would kick-start it into using the  
> database).  Finished installation, which didn't do it - basically  
> every single page failed with Syntax Errors, couldn't open or find  
> every database.  OK, so maybe something was wrong with the tables.   
> Went into phpmyadmin, noticed that basically the only tables with  
> information in them were interwiki (168 records) and searchindex (970  
> records).  Everything else had 0, 1 or 2 records.
> 
> I deleted everything, did a fresh install of MediaWiki again with no  
> database in place first.  That worked, installed a brand new wiki, no  
> problems.  I deleted that new "wikidb" and replaced it with a fresh  
> copy of my unzipped backup files.  Same problems on the page, and now  
> when i go to phpmyadmin, it says everything is "in use".  I cannot  
> check/optimize/repair any of them.  Renamed the database, now I have  
> access to most of them, and they mostly come back "ok" on a check -  
> when I run repair, they ALL say "The storage engine for the table  
> doesn't support repair".
> 
> Furthermore, when I try to run maintenance scripts such as  
> update.php , I keep running into problems of the table named  
> wikidb.page_restrictions missing.   Looking at my backed-up copy (plus  
> another completely separate backup from October on another computer),  
> we do not have the table in our wiki.db, and probably never have.   
> Only the NEW installation of wikidb produced that table.  Should we  
> have one?  Is this a problem??
> 
> I would gladly send anyone a copy of the files to see if they can make  
> anything of them.
> 
> My concerns at this point are numerous:
> 	Is it possible to recover a database in this method?
> 	Even if I recover, do I actually have data in there?  The file sizes  
> and table structure seem to indicate that my data is bunk, but maybe  
> since it's all text, itmakes sense that it's so small.
> 	What is this wikidb.page_restrictions and should I care if I don't  
> have it?
> 	How could I ensure that I am better backed-up in the future?  Are  
> there ways I can improve what is backed up, and methods to recover it?
> 
> Thanks for making it this far!  If any of you have the time to write  
> back with any suggestions, I'd be forever grateful.
> 
> Dan
> --
> Dan Saperstein
> dan.saperstein at gmail.com
> 
Can't offer any help but I am VERY interested in the correct answer as
this EXACT!!! thing happened to me about a month ago. I got no answer
here or on any of the wiki lists. PLEASE. If you find out something let
me know. I currently have webmin backing up all of my databases right
now and they seem to be growing correctly, but I do not have the nerve
to blow one up to try out a restore using webmin or phpmyadmin.
Best wishes!!
Frosty




More information about the MediaWiki-l mailing list