Skip to content

Instantly share code, notes, and snippets.

@pete
Created March 15, 2012 20:45
Show Gist options
  • Save pete/2046785 to your computer and use it in GitHub Desktop.
Save pete/2046785 to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment