PostgreSQL

PostgreSQL

Backup

pg_dump
  • pg_dump -U username table > file.bak

    pg_dump -U postgres project > backup_db.bak

Restore

  • psql -U < .sql

    psql -U postgres project < backup.bak
  • pg_restore -U -d -1 .dump

    pg_restore -U postgres -d project -1 backup.dump