Database restoration for site with DB size more than 25 GB


I want to restore a SQL file with size more than 25 GB what process I need to follow that, and how much time it will take ?

More: Moving to docker - #6 by revant_one


The answer depends a lot on hardware, and a few other factors.

Last year I did several SQL restores of a ~22 GB database. I did not take accurate measurements, but the average time was approximately 60-90 minutes.

For the comparatively fast DB restoration, stop all the processes except the MySQL process, if possible. So that all resources will be utilized for the MySQL process. In our case, tabVersion and tabWorkflowAction tables were having a high volume of data. You may observe the restoration process by SHOW PROCESS LIST; MySQL command in a separate terminal during restoration.

As someone rightly said, it depends on the hardware. We had a DB of around 60 GB size which took 2 hours and 30 minutes approximately. Make sure to tune the “max_allowed_packet” MySQL configuration parameter to avoid abrupt termination of the data restoration process.

max_allowed_packet              = 2G