How to Recover a Broken Drupal Install Resulting from a Full Hard Drive

Tagged:  

This is amazingly, the second time I've filled my server's hard drive, and the results are becoming predictable. One moment, things are working fine, the next, cron alerts you with something like this:
Table [tablename] is marked as crashed and last (automatic?) repair failed query

This is a bad warning to get, and running df on the server confirms that indeed my hard drive is full. Fixing this is a matter of doing some minor MySQL hacking to clean up all the tables:
mysql -u'drupalusername' -p
> use drupal_DB_name;
> check table tablename;
> repair table tablename;

Then, simply iterate this for each broken table reported by cron.php, and you will soon have a repaired DB. Whew.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.