{"id":12829,"date":"2014-04-08T17:26:09","date_gmt":"2014-04-08T11:56:09","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=12829"},"modified":"2016-12-19T14:53:48","modified_gmt":"2016-12-19T09:23:48","slug":"show-status-of-mysql-imports-using-pipeviewer","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/show-status-of-mysql-imports-using-pipeviewer\/","title":{"rendered":"Show status of MySQL imports using PipeViewer"},"content":{"rendered":"<p>While working on my current application, I had to import a large database using mysql from a sql dump. The size of the sql dump was around 1.5 GB and hence the import was taking long time. I just felt the need of some tool that could help me check the progress of the import.<\/p>\n<p>The command I used was:<\/p>\n<p>[sql]<br \/>\nmysql &#8211;user=username &#8211;password=password database_name &amp;lt; dump.sql<br \/>\n[\/sql]<\/p>\n<p>So I searched and thankfully, found an ubuntu package, <a href=\"http:\/\/www.ivarch.com\/\" target=\"_blank\">PipeViewer(pv)<\/a> which shows a neat progress-bar with useful information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.<\/p>\n<p>To install simply type:<\/p>\n<p>[shell]<br \/>\nsudo apt-get install pv<br \/>\n[\/shell]<\/p>\n<p>Example usage:<\/p>\n<p>[shell]<br \/>\npv dump.sql | mysql &#8211;user=username &#8211;password=password databse_name<br \/>\n[\/shell]<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2014\/04\/pipe-viewer.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-12828\" src=\"\/blog\/wp-ttn-blog\/uploads\/2014\/04\/pipe-viewer.png\" alt=\"\" width=\"742\" height=\"193\" \/><\/a><\/p>\n<p>I hope you&#8217;ll find this post usefull.<\/p>\n<p>Nikhil Bhandari<br \/>\nIntelliGrape Software Pvt. Ltd.<br \/>\n<a href=\"mailto:nikhil.bhandari@intelligrape.com\">nikhil.bhandari@intelligrape.com<\/a><\/p>\n<p>Source: <a title=\"Author's Site\" href=\"http:\/\/www.ivarch.com\/\" target=\"_blank\">Author&#8217;s Site<\/a>\u00a0&#8211;\u00a0Man Page<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on my current application, I had to import a large database using mysql from a sql dump. The size of the sql dump was around 1.5 GB and hence the import was taking long time. I just felt the need of some tool that could help me check the progress of the import. [&hellip;]<\/p>\n","protected":false},"author":93,"featured_media":12828,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":21},"categories":[7],"tags":[4840,1380,260,76,778,1381,822],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/12829"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/93"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=12829"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/12829\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media\/12828"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=12829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=12829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=12829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}