Skip to content

Instantly share code, notes, and snippets.

View tsaodown's full-sized avatar

Edd Tsao tsaodown

View GitHub Profile
@kmatt
kmatt / pv_dump.sh
Created May 24, 2012 20:07
Monitoring dump and restore with pv
# dump
pg_dump testdb | pv -c -s $(psql -tc "SELECT pg_database_size('testdb')") -N dump | gzip > testdb.sql.gz
# restore
pv testdb_20120501.sql.gz | zcat | psql testdb