Mysql database dump and restore with pv to (and from) a sql.gz file

$ mysqldump -u [username ] -p [dbname] | pv | gzip -9 > [dbdump.sql.gz]

 

$ pv dbdump.sql.gz | gunzip | mysql -h hostname -uusername -p dbname

 

No tags for this post.

Leave a Reply

CommentLuv badge