Last active
June 11, 2018 12:50
-
-
Save ufuk/d1b9410d3cdd9c67f70eef21366ca008 to your computer and use it in GitHub Desktop.
Exporting and then importing full schema for PostgreSQL.
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
# export | |
PGPASSWORD="<PASSWORD>" pg_dump -U <USERNAME> -h <HOST> -d <DB_NAME> -n <SCHEMA_NAME> > export.sql | |
# import | |
PGPASSWORD="<PASSWORD>" psql -U <USERNAME> -h <HOST> -d <DB_NAME> -n <SCHEMA_NAME> -f export.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment