Bagaimana Cara Melakukan Backup dan Restore di PostgreSQL ?
........
Troubleshoot
1.
$pg_dump -U edisposisi edisposisi -f edisposisi_postgresql.sql
pg_dump: [archiver (db)] connection to database "edisposisi" failed: FATAL: Ident authentication failed for user "edisposisi"
Jika menemui masalah diatas, baca ref. 2
Jika sudah, dan di pg_hba.conf user lokal diset diperbolehkan login via tcp/ip, maka tambah apsi -h pada perintah diatas, sehingga perintah diatas menjadi seperti berikut :
$pg_dump ----no-tablespaces --no-owner -U edisposisi edisposisi -h localhost -f edisposisi_postgresql.sql
Referensi
How To Backup and Restore PostgreSQL Database Using pg_dump and psql, http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/
“FATAL: IDENT AUTHENTICATION FAILED”, OR HOW COOL IDEAS GET BAD USAGE SCHEMAS, http://www.depesz.com/index.php/2007/10/04/ident/
How to Dump and Restore Postgres Plus(R) Databases Using pgAdmin, View|Download
Barman (Backup and Recovery Manager), http://www.pgbarman.org/