• 追加された行はこの色です。
  • 削除された行はこの色です。
* バックアップ・リストア [#n6d2ab7e]

** DBバックアップ [#r37afb99]
** カスタムアーカイブ形式でDBバックアップ [#r37afb99]
 pg_dump -Fc foo_db

** テーブルを指定してバックアップ [#f9c7c152]
** カスタムアーカイブ形式でテーブルを指定してバックアップ [#f9c7c152]
 pg_dump -Fc -t bar_table foo_db

- -Fcでカスタムアーカイブ形式を指定してバックアップをするのがオススメらしい。

** プレーンテキスト形式バックアップのリストア [#r3fdb1fe]
 psql -f mydb_dump.sql

** カスタムアーカイブ形式バックアップのリストア [#p26843f9]
 pg_restore -d postgres < mydb_dump.custom

** 参考 [#r8f716cf]
: 論理バックアップ(pg_dump と pg_dumpall) - Let's PostgreSQL | http://lets.postgresql.jp/documents/technical/backup/2
: PostgreSQLバックアップ・リカバリ入門 - Slideshare | http://www.slideshare.net/satock/osc2013-spring-pg


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS