-
-
Save suryatmodulus/e7dff45e9acb6db9960c3e4fd8d7b5c6 to your computer and use it in GitHub Desktop.
Monitoring dump and restore with pv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment