Skip to content

Instantly share code, notes, and snippets.

@danielbaccin
Created November 3, 2015 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbaccin/dfe2bef903703e999e96 to your computer and use it in GitHub Desktop.
Save danielbaccin/dfe2bef903703e999e96 to your computer and use it in GitHub Desktop.
backup and restore postgresql
Gerar dump: pg_dump -h 127.0.0.1 -p 5432 -U postgres bembomsupermercados > bembomsupermercados.sql
Restaurar o banco: psql -h localhost -p 5432 -U postgres -f /home/daniel/bembomsupermercados.sql -W bembomsupermercados
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment