Skip to content

Instantly share code, notes, and snippets.

@khaliqgant
Last active March 16, 2022 09:10
Show Gist options
  • Save khaliqgant/6ee6370bec51f3c99eab578d49c72cae to your computer and use it in GitHub Desktop.
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
# 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