Crashed HDD, need to restore database via files

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.
 
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.

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?
 
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.
 
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:

http://www.softwareprojects.com/res...to-fix-mysql-database-myisam-innodb-1634.html

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

Ideally you should have a mysqldump backup.

http://xenforo.com/community/resources/how-to-backup-and-restore-your-forum-linux-windows.359/
 
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.
 
Does your backup or whatever you got the data folder from include ibdata1 and the innodb log files?
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.
 
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.

Is the db still intact?
 
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.
 
Back
Top Bottom