Recovering MySQL dumps can take a long time. This is because it really restores all tables.
What you need to do to fix this depends on the engine, but in general
I would say do the following:
Zeroth Rule: Use only 64-bit OS.
- Make sure that you have enough physical plunger to install the largest single table in memory; include any overhead for the OS in this calculation (NB: On operating systems that use 4k pages, that is, all of them, page tables occupy most of the memory in systems with large memory - do not forget about this)
- Configure innodb_buffer_pool so that it is larger than the largest single table; or, if you are using MyISAM, configure key_buffer to be large enough to hold the indexes of the largest table.
- Be patient.
Now, if you still find that it was done slowly, your particular database may have a very complicated structure to recover.
Personally, I managed to rebuild the server with ~ 2Tb in <48 hours, but this was a special case.
Make sure your development system has production-level hardware if you intend to upload production data to it.
In particular, if you think that you can massage data in tables that do not fit into memory (or, at least, mainly in memory), forget about it.
If all this seems too big, remember that you can simply use the file system or an online LVM snapshot from InnoDB, and then just copy the files. With MyISAM, this is a bit more complicated, but still can be done.
Markr
source share