Problem Restoring Database Properly

carock

Well-Known Member
Sep 25, 2002
270
9
168
St. Charles, MO
I was tasked with restoring a user's MySQL database from backup.

The user was not in the normal backups, but their database was backed up in the system backup.

The problem I had is their database was InnoDB, so you can't just copy the files and make magic happen.

I would like to suggest maybe a SQL dump of the entire MySQL install instead of just copying files. Even copying the MyISAM can be tricky for restores.

Unless I'm missing something, the file backups of InnoDB databases are just about useless.

Chuck
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
28
178
cPanel Access Level
Root Administrator
Twitter
A MySQL dump of the entire system would be bad and take forever. It'd be next to impossible to restore as well. I mean, that would be one giant .sql file

cPanel does have the option for 'per account and MySQL directory'. This is what you want

When this is checked, cPanel will do what is expected, produce an SQL dump of each account's database, as well as the entire MySQL directory.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The user was not in the normal backups, but their database was backed up in the system backup.
Hello,

The following guide is available for information on recovering an InnoDB database:

InnoDB Corruption Repair Guide

Let us know if this guide is helpful.

Thank you.
 

carock

Well-Known Member
Sep 25, 2002
270
9
168
St. Charles, MO
Yes, that is what I was looking for. That document didn't show up when I started this thread or searched, I don't know why.

Thank you both for the help.

The customer is now in the regular backups, so I hope I don't need to restore InnoDB the hard way anytime soon, knock on wood.

Chuck
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

I'm happy to see the document was helpful. Thank you for updating us with the outcome.