Last active
March 16, 2022 09:10
-
-
Save khaliqgant/6ee6370bec51f3c99eab578d49c72cae to your computer and use it in GitHub Desktop.
[Postgres Create Dump & Restore] Fast way to create a postgres dump #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
# dump | |
pg_dump -h localhost -U postgres -p 5432 -Fc -Z 9 --file=local.dump | |
# restore | |
pg_restore -h localhost -U postgres -Fc -j 8 -p 5432 -vvv -d postgres local.dump | |
# source: https://stackoverflow.com/questions/15692508/a-faster-way-to-copy-a-postgresql-database-or-the-best-way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment