title: Is there any way to show progress on a `gunzip < database.sql.gz | mysql ...` process?
body: <p>Once a week I need to run a giant database update into my local development environment like so:</p>
  
  <pre><code>$ gunzip &lt; /path/to/database1.sql.gz | mysql -uUSER -p database1 &amp;
  $ gunzip &lt; /path/to/database2.sql.gz | mysql -uUSER -p database2 &amp;
  $ gunzip &lt; /path/to/database3.sql.gz | mysql -uUSER -p database3 &amp;
  </code></pre>
  
  <p>I try to run these overnight since it can take several hours to complete.</p>
  
  <p>Can you help me come up with a way to show progress on these tasks?</p>
  
  <p>Here are some guesses:</p>
  
  <ol>
  <li>Get the uncompressed filesize of the db and compare with my local db size</li>
  <li>Run <code>show processlist</code> in mysql to see what table it's currently inserting (my current method, but some tables are huge, and at least one db of mine only has one giant table so the bulk of the process is stuck in this table, leaving this option less than helpful)</li>
  </ol>
  
  <p>All of the db.sql.gz files are standard gzipped mysqldumps, so I don't think I can build anything into the dumps to give me an update.  (But I'm open to that if I'm missing something)</p>
  
  <hr>
  
  <p><strong>Bounty Rules</strong></p>
  
  <p>Answers must:</p>
  
  <ol>
  <li>Provide useful and reasonably accurate progress (either visual like <code>scp</code> (preferred!) or through a simple progress database table that could be accessed easily).</li>
  <li>Not break regular <code>mysqldump</code> export or regular <code>gunzip ... | mysql</code> import (for other engineers who may not use whatever you come up with)</li>
  <li>Not give my DBA a heart attack — so stay easy on special <code>mysqldump</code> or alternative mysql branch requests.</li>
  </ol>