1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Crashed HDD, need to restore database via files

Discussion in 'Troubleshooting and Problems' started by Carla Birch, Dec 21, 2012.

  1. Carla Birch

    Carla Birch Well-Known Member

    Hi all,

    My hdd's failed on my server and i need to restore the database from the mysql folder files, but when i do so it keeps crashing the mysql.

    Has any one here restored a xenforo database from a crashed server that is able to help, paid if needed.
  2. borbole

    borbole Well-Known Member

    What is the exact error message that you get when you are trying to restore the db?

    Can you give us a few more details as well, like the size of the sql file and the method that you are trying to restore it?
    Jake Bunce likes this.
  3. Carla Birch

    Carla Birch Well-Known Member

    Basically all i have is the .frm .MYI files and so on.

    So i set up the database via plesk, stopped mysql, copyed the database files via shh, set user to mysql and restarted it.
    But i get a load od errors like this then.

    121221 11:43:40 [ERROR] Cannot find or open table yourplay_xen/xf_option from
    the internal data dictionary of InnoDB though the .frm file for the
    table exists. Maybe you have deleted and recreated InnoDB data
    files but have forgotten to delete the corresponding .frm files
    of InnoDB tables, or you have moved .frm files to another database?
    or, the table contains indexes that this version of the engine
    doesn't support.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I have never tried restoring a database from the MySQL data files. Very likely you will need to set appropriate file system permissions and ownership for the files you copy. Then this guide might be useful:


    XenForo uses mostly InnoDB tables, with a few MyISAM. That guide talks about recovering both.

    Ideally you should have a mysqldump backup.

    borbole likes this.
  5. HWS

    HWS Well-Known Member

    Regular InnoDB cannot be restored just by copying files. This error won't go away.

    You need to backup such files using an InnoDB backup software (XtraBackup for example) and run a special MySQL server (Percona for example) to allow importing the backup. You will also need the InnoDB logfiles for a successful restoration.

    Or you can do a backup of your database by just running mysqldump and storing the resulting SQL files.

    Since this all is to late for you know, please consult a professional InnoDB expert, maybe your files can be checked, manually exported and restored somehow. I assume this may cost some money...

    Sorry, hope you can find some success.
    Jake Bunce likes this.
  6. Carla Birch

    Carla Birch Well-Known Member

    Hi HWS,

    Do you have any leads as to where i might find a trusty InnoDB expert?
  7. Luke F

    Luke F Well-Known Member

    Does your backup or whatever you got the data folder from include ibdata1 and the innodb log files?
    Jake Bunce likes this.
  8. Carla Birch

    Carla Birch Well-Known Member

    Yes it does Luke, but when i restore them all to the server the mysql starts to list a load of errors like above and then crashes and will not start. So i don't get time to access phpmyadmin where i would be able to download a sql what i could then restore to a fresh database.
  9. borbole

    borbole Well-Known Member

    Is the db still intact?
  10. Carla Birch

    Carla Birch Well-Known Member

    No i think the ibdata1 file as messed up as the tablespace don't want to work, on the plus side i have found a month older database that as worked, so atlest i have not lost a full 4 years of data. Working on getting that all back up now, fingers crossed it will work.

Share This Page