I've developed a little script over the years that dumps production databases, and loads them locally on demand, and its been very handy.

However, it was taking ages to load a database on a Virtualbox ubuntu environment I use for debugging with Zend.

A quick look into it, and I found that i'd put

on the mysqldump command sometime in the past.

I changed that to

--add-locks --extended-insert
and the loading has gone from over 12 hours (I was asleep, not waiting for it ;-) down to 30 minutes.

Thats a significant speedup!

While in there I added a progress meter using the pv command, the code looks like this:


Maybe you can use that snippet yourself, or even better, utilise the excellent drush command for Drupal, which has a similar ability.