Created
December 3, 2022 21:15
-
-
Save adamghill/800008aa4d6410931858c695464e83f4 to your computer and use it in GitHub Desktop.
Backup and restore 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=PASSWORD pg_dump -h HOST_URL -p PORT -U USER --format=custom --no-acl --no-owner DATABASE_NAME > sql.dump | |
PGPASSWORD=PASSWORD pg_restore --verbose --clean --no-acl --no-owner -h HOST_URL -p PORT -U USER -d DATABASE_NAME sql.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment