Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My root access linux server has crashed and I cannot SSH into it or interact with it. I can, however tell the online console to do a network boot to a "rescue system" which allows me to access the files on the server.

This means I can only get the raw folder of my database and I can't perform an SQL dump.

It doesn't work if I just copy the folder of my database, because on my new working server it says some tables are not available. Apparently it is because of InnoDB and that I should copy the ibdata1, ib_logfile0 and ib_logifle1 files as well.

Can I just overwrite the ib* files on my news server with the ib* files of the old server? Is there any way I can transfer this database just by copying files?

share|improve this question

If you copy the ib* files and all the subdirectories in /var/lib/mysql (or whatever you MySQL data directory was) along with the my.cnf from /etc to the new server, it should start up as if nothing had happened. There is no way to transfer InnoDB tables or databases other than that. Even with the innodb_file_per_table option, InnoDB still stores metadata in the central database file, so you cannot recover without it.

share|improve this answer
My DB's name is "istyla". I've copied the istyla folder to the new server and it shows the db exists. If I copy the ibdata1, ib_logfile0 and ib_logfile1 to the news server, will it work. Should I overwrite the ib* files on the new server? (I don't have any other DB's on the new server.) – Jacques Blom Mar 13 '13 at 13:05
Yes, you must replace the ib* files. The content in the folder is just descriptive, and does not constitute the database contents. – Stefan Seidel Mar 13 '13 at 13:57
The one table, "user" does not have an MYD or MYI file. Looks like my server has been hacked? :( Lost about 5000 user's data. I still have the other 41000, though. Thanks for the help! :) – Jacques Blom Mar 13 '13 at 14:31
Make sure that your ib_logfile? files have the same size. If you had set their size to a different value in my.cnf, it won't replay the transaction log. – Stefan Seidel Mar 13 '13 at 14:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.