Last active
August 9, 2021 08:15
-
-
Save gusdewa/42fc5932cc649a4f5d3b5a28e471bfd9 to your computer and use it in GitHub Desktop.
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
pg_dump -h hostname -p 5432 -U username -Fc dbname > dbname_$(date +"%Y-%m-%d").dump | |
-- WITH CERT | |
pg_dump "port=<port> host=<host> user=<user> dbname=<db> sslcert=<cert> sslkey=<key> sslrootcert=<ca.crt> sslmode=verify-ca" -Fc > dbname_$(date +"%Y-%m-%d").dump | |
pg_restore -U username -d dbname_target -h hostname -p 5432 --disable-triggers filebackup.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment