Skip to content

Instantly share code, notes, and snippets.

@savchukoleksii
Last active November 17, 2020 14:23
Show Gist options
  • Save savchukoleksii/0524e0d08598c85e85b178bdca5d63e6 to your computer and use it in GitHub Desktop.
Save savchukoleksii/0524e0d08598c85e85b178bdca5d63e6 to your computer and use it in GitHub Desktop.
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
pg_dump -h {host} -p {port} -Fc -o -U {user} {database} > dump.sql.tar
pg_restore -d {database} {file} -Fc -U {user} -W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment