You may use -v : Verbose mode (show progress) in your command, or there's another method using Pipe Viewer (pv
) which shows the progress of the gzip, gunzip command as follows:
$ pv database1.sql.gz | gunzip | mysql -u root -p database1
This will output progress similar to scp:
$ pv database1.sql.gz | gunzip | mysql -uroot -p database1
593MiB 1:00:33 [ 225kiB/s] [====================> ] 58% ETA 0:42:25
You can also use Pipe Viewer to monitor mysqldump:
mysqldump -uroot -p database1 | pv | gzip -9 > database1.sql.gz
If you don't already have pv
, you can install it with:
yum install pv
or with macports
sudo port install pv
or with homebrew
brew install pv