Created
October 22, 2023 18:26
-
-
Save johndevs/163b5a2c1f73bdb3c653d5a495f83e9a to your computer and use it in GitHub Desktop.
Clone Postgres database
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
PGPASSWORD=[source password] pg_dump -h [DB_hostname] -U [username] -W -d [source_database] -v -Fc | PGPASSWORD=[destination password] pg_restore -h [DB_hostname] -U [username] -W -v -d [destination_database] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment