Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save josephbridgwaterrowe/398f0398467b765690fedcf5fa542452 to your computer and use it in GitHub Desktop.
Save josephbridgwaterrowe/398f0398467b765690fedcf5fa542452 to your computer and use it in GitHub Desktop.
PostgreSQL dump and restore
pg_dump DB_URL --clean --if-exists --no-owner --no-acl --file /tmp/db.dmp
psql (DB_URL | -d DB_NAME) < /tmp/db.dmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment