0

what is the best procedure to quickly restore the MySQL database without using dump files. can any body help me in this regard. Thanks in advance.

2
  • I think it is possible if you have physical files. whice storage engine of MySQL you are using? Please refer below link for more options :stackoverflow.com/questions/484750/…
    – MySQL DBA
    Commented Aug 3, 2015 at 11:47
  • I am using InnoDB storage engine. I have set innodb_file_per_table = ON while creating tables. So, I have physical files mytable.frm and mytable.ibd and ibdata1. Can I restore MySQL data using these 3 files or is there any dependent files. Please let me know. Thanks in advance.
    – srinivas
    Commented Aug 3, 2015 at 14:09

1 Answer 1

1

Ofcourse a physical files restore will be quicker than loading a dump. So, if you have full physical backup / snapshot of mysql data-directory - you can go fast!

(Below answer assumes that you have physical backup available.)

Tables are MyISAM:

Stop mysql

Copy database folder to mysql datadir

Correct permissions

Start mysql

Tables are InnoDB:

If we have InnoDB tables in the picture then things are not as simple. Considering you have Xtrabackup.

You will have to import tables one after another.

Refer Importing-Exporting-Tables-using-Xtrabackup OR how-to-recover-a-single-innodb-table-from-a-full-backup (For this to work you should have used xtrabackup as backup option.)

Splitting mysqldump

If you want to extract only one database from full mysqldump then you might want to extract single database from mysqldump and load it (saves you from loading full dump).

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