Skip to main content
knackforge blog knowledge base

Restore database faster from SQL dump

At KnackForge, MySQL has been the primary choice of persistent backend storage. Late-off one of the Drupal sites we maintain had grown to accomodate thousands of contents. This inturn introduced the need for having a different strategy for backup. More details about the project will be shared in the follow up post. For this post I would like to share a simple configuration trick that helped us to speed the restoration process from SQL dump.

In your my.cnf add the following lines,

[mysqld]
# Performance settings used for import.
delay_key_write=ALL
bulk_insert_buffer_size=256M

As you can infer, the above two lines changes the way the indices are written to disk. As most other configuration tweak MySQL server needs restart for this change to reflect.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.