Created
January 29, 2019 19:19
-
-
Save bianchimro/e4b3c39c2c88d9ed24ce7dd8a61e903d to your computer and use it in GitHub Desktop.
postgres db dump and restore
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
/usr/bin/pg_dump -Ft --no-acl --no-owner -h <HOST> -p 5432 -U <USER> <DB_DA_COPIARE> -f /tmp/dump.tar && \ | |
/usr/bin/pg_restore -n public -h <HOST> -p 5432 -U <USER> -d <DB_NUOVO> /tmp/tmp.tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment