jump to navigation

Backup dan Restore Postgre Januari 13, 2009

Posted by kidnap in Database.
Tags:
trackback

Untuk Backup Database Postgre ternyata sangat mudah dilakukan..

Gunakan Command Prompt Postgre.

Contoh : pg_dump -cDd – Fp -U postgres master > data.sql

Keterangan :

c = Perintah untuk menghapus database

D= Perintah untuk insert column

d= Insert

F= Format file

U= Nama User

Master= Nama database yang akan dibackup.

p= Format file dalam bentuk plain text

Untuk Restore Databasenya seperti ini:

Contoh : psql -U postgres -d master – f data.sql

Keterangan

U = nama user

d= nama database

f= nama file yang akan direstore

Komentar»

No comments yet — be the first.