Pipe Viewer views pipes - and long running restores
Example:
pv dump.sql.gz | zcat | psql db_name
Displays progress in the form of:
359MB 0:35:14 [28.4MB/s] [==> ] 12% ETA 2:28:41
Monitoring a PostgreSQL dump, including time estimate based on total table data size:
pg_dump $db| pv -s $(psql -d $db -tc "SELECT SUM(pg_table_size(oid)) FROM pg_class WHERE relkind='r'") | pigz -c > /backup/$db.sql.gz
http://www.ivarch.com/programs/pv.shtml
Edit 2012-01-01: Updated backup example to base time estimate on table data only, not index size
Written by Matt Keranen
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Database
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#