Created
September 26, 2019 18:53
-
-
Save l2ysho/72d3298c367f7889b04413ee5700a33f to your computer and use it in GitHub Desktop.
Postgress usefull cli comands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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