Skip to content

Instantly share code, notes, and snippets.

@l2ysho
Created September 26, 2019 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l2ysho/72d3298c367f7889b04413ee5700a33f to your computer and use it in GitHub Desktop.
Save l2ysho/72d3298c367f7889b04413ee5700a33f to your computer and use it in GitHub Desktop.
Postgress usefull cli comands
pg_dump -U [user] -d [database] -h [host] -p [port] -f [filename] -O -F tar
pg_restore -O -d [database] [filename]
# -O => --no-owner => cancel ownership of object to match original db
# -F => --format => tar -> Output a tar-format archive suitable for input into pg_restore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment