Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 181 Bytes

psql-backup-restore.md

File metadata and controls

15 lines (10 loc) · 181 Bytes

postgres backup restore

backup

pg_dump dbname > file.sql

restore

  • drop and recreate target db first
cat file.sql | psql -h host -U postgres dbname