gist:2046785
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
#!/bin/sh | |
dropdb thedb | |
createdb thedb | |
ssh root@host5 /usr/local/pgsql/bin/pg_dump \ | |
gzip -c \| \ | |
tee prod.db.gz | \ | |
gunzip | \ | |
tee prod-without-audits.sql | \ | |
psql thedb | |
psql thedb < prod.db.audit_schema |