Last active
December 31, 2019 07:30
-
-
Save sivakumarbdu/2844df9183412f9d5594c8995a41c8d0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 -F c -h localhost -U pg_user -d db_name | gzip -c > sql_dump.gz | |
#-F format c -> custom | |
#Restore | |
pg_restore -U username -d db_name -v dumpfile_location -h localhost | |
#Export specific table | |
pg_dump -h host_name -U username --table=schema_migrations --data-only --column-inserts table_name > data.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment