Created
September 11, 2009 00:56
-
-
Save pop3xrj/184976 to your computer and use it in GitHub Desktop.
postgresql db backup and pump into bz2
This file contains 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
pg_dump -Unrcrm -h 192.168.x.x --exclude-table=public.foo --exclude-table=public.bar dbname | bzip2 -c > ~/file.bz2 | |
bzip2 -d db.sql.bz2 |psql test test | |
SELECT relname, reltuples, relpages * 8 / 1024 AS "MB" FROM pg_class ORDER BY relpages DESC; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment