Created
March 15, 2018 11:12
-
-
Save leeeandroo/cdc6988616b93f0274a7d7bb1819b741 to your computer and use it in GitHub Desktop.
dump & restore psql
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
sudo su - postgres | |
pg_dump -Fc mydatabase > /tmp/mydatabase.sql | |
sudo su - postgres | |
pg_restore --verbose --clean -d mydatabase /tmp/mydatabase.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment