The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem Restoring Database Properly

Discussion in 'Data Protection' started by carock, Jun 17, 2016.

Tags:
  1. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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
     
  2. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page