Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This is what I would do to backup my old database and restore
To back up your database
pg_dump --format=c olddb_name > db_dump_file.dump
To restore that backup
pg_restore -v -d newdb_name db_dump_file.dump
Read more on pg_dump and pg_restore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.