TurnKey Linux Virtual Appliance Library

MySQL Backup and Restore Fail

Hi

I'm still restoring my server and have got to the MySQL databases for MediaWiki and Moodle.  On the old appliance, I set up a scheduled backup for MySQL from the MySQL server module and let it happily chug away.  Now when I restore the MySQL backups to the new, clean server, I get errors in MediaWiki and Moodle which I've traced to the backup sql files having omitted the 'Auto_increment' extra on a number of primary keys.

*Despair* since I only had the backup sql files until I realised that I could just restore the databases onto a clean VM from TKLBAM (Thankyou!).  So I check the restored databases and the auto_increment primary keys are correct.  I run another backup through MySQL, ticking all the boxes in other backup options (Key, table, field) which I assume would generate the Auto_increment extra in the correct fields ... but it does not.

For instance, original SQL for the 'text' table in MediaWiki ...

CREATE TABLE `text` (
  `old_id` int(10) unsigned NOT NULL auto_increment,
  `old_text` mediumblob NOT NULL,
  `old_flags` tinyblob NOT NULL,
  PRIMARY KEY (`old_id`)

... SQL in dumped SQL file ...

CREATE TABLE `text` (
  `old_id` int(10) unsigned NOT NULL,
  `old_text` mediumblob NOT NULL,
  `old_flags` tinyblob NOT NULL,
  PRIMARY KEY (`old_id`)

I can't see any other options in the MySQL backup form so I don't know what I'm doing wrong.  Help!

Mark

Oh Oh Oh

I could have done with reading the webmin page more carefully when it says 'Structure information to EXCLUDE' rather than 'INCLUDE'. 

Sorry - problem fixed ...

Mark

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)