gist:2046785

gistfile1.txt
#!/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