文書の過去の版を表示しています。


Backup & Restore Database in Postgresql

pg_dumpを利用したバックアップとリストアの手法を紹介する。

Backup data with pg_dump

localhostのeccube_db_testデータベースのc_actionテーブルのバックアップを取る例を次に示す。

C:\Program Files\PostgreSQL\8.3\bin>pg_dump -i -h localhost -p 5432 -U
eccube_db_user -F c -b -v -f "D:backcup\c_action.backup" -t c_action eccube_db_test

Restore data with pg_restore

localhostのeccube_dbへリストアする例を次に示す。

C:\Program Files\PostgreSQL\8.3\bin>pg_restore -i -h localhost -p 5432 -U
eccube_db_user -d eccube_db -v "D:\backup\c_action.backup"

reference


QR Code
QR Code study:database:postgresql:backup (generated for current page)