Large Database Import Progress Using PV
PV can report progress for large data imports. In this example I will use a large (7 G) install on Ubuntu. First, download PV (http://linux.die.net/man/1/pv)
sudo apt-get install pv
A traditional mysql import may be formatted as:
mysql -u USER -p DATABASE_NAME < DUMP.mysql
but to leverage PV, pass the dump file ,then pipe the mysql command specifying the database with -D
flag:
pv DUMP.mysql | mysql -u USER -p -D DATABASE_NAME
Your import will report progress and an ETA :)
Written by Brad
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#