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 

  1. 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/
  2. “FATAL: IDENT AUTHENTICATION FAILED”, OR HOW COOL IDEAS GET BAD USAGE SCHEMAS, http://www.depesz.com/index.php/2007/10/04/ident/
  3. How to Dump and Restore Postgres Plus(R) Databases Using pgAdmin, View|Download
  4. Barman (Backup and Recovery Manager), http://www.pgbarman.org/

Ċ
Wildan Maulana,
Oct 16, 2011, 4:29 PM
Comments