Skip to content

Instantly share code, notes, and snippets.

@ajsharp
Last active September 19, 2021 17:35
Show Gist options
  • Save ajsharp/7c89438e267ebd037113dd1cd056654c to your computer and use it in GitHub Desktop.
Save ajsharp/7c89438e267ebd037113dd1cd056654c to your computer and use it in GitHub Desktop.
pg_dump to dump an entire postgres database
pg_dump -a --format=c --no-owner --no-privileges --no-publications --no-subscriptions -d DBNAME -U USERNAME -W -h HOSTNAME -f dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment