Skip to content

Instantly share code, notes, and snippets.

@dmitrylitmanovich
Last active October 26, 2022 10:37
Show Gist options
  • Select an option

  • Save dmitrylitmanovich/9ad7deeede0a87b0ebba71e6f5dd83c6 to your computer and use it in GitHub Desktop.

Select an option

Save dmitrylitmanovich/9ad7deeede0a87b0ebba71e6f5dd83c6 to your computer and use it in GitHub Desktop.
restore using psql
psql -U username -d dbname < filename.sql

For Postgres versions 9.0 or earlier:

psql -U username -d dbname -1 -f filename.sql
@dmitrylitmanovich
Copy link
Author

pg_restore -U username -d dbname -1 filename.dump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment