Faster way to dump mysql

12,028

Solution 1

Check out http://www.mydumper.org - multi-threaded mysql backup/restore which is 3x to 10x times faster than mysqldump http://vbtechsupport.com/1695/

Solution 2

If you use MyISAM tables, you can just copy the files (.MYD, .MYI & .frm) in your data directory. For me this is a huge advantage over InnoDB as I frequently need to move large tables.

It is recommended to shutdown the mysql server before coping the files.

Solution 3

I believe that is the way mysqlhotcopy works: It locks down the tables, and then copies the actual binary data across (instead of creating natural-language INSERT statements).

Share:
12,028
joeellis
Author by

joeellis

Updated on June 04, 2022

Comments

  • joeellis
    joeellis almost 2 years

    Possible Duplicate:
    Speeding up mysql dumps and imports

    This may be a dumb question, but I was just watching a screencast on MySQL replication, and I learned that a master database doesn't send SQL over to a slave for replication, it actually sends data over in binary, which makes importing extremely fast. I started wondering, "if a database can export and import binary, why do mysqldumps / imports take so long?" Is there a way to get mysql to dump a database in binary in a similar fashion to speed up that process as well?