一括バックアップからのリストアは
よくある事ですが、テーブルのリストアって
あんまりない気がします。
私だけ??
とりあえずよく忘れがちなので備忘録として。
テーブルのバックアップとリストア
バックアップ処理。
pg_dump データベース名 -t テーブル名 > backup.sql
既にリストアするテーブルが存在していれば削除。
drop table テーブル名
リストア処理
psql データベース名 < backup.sql
こちらで完了です。
東京うぇ部
PHPをメインにしたプログラム情報共有サイト
2014/04/11 | category:Postgres
一括バックアップからのリストアは
よくある事ですが、テーブルのリストアって
あんまりない気がします。
私だけ??
とりあえずよく忘れがちなので備忘録として。
pg_dump データベース名 -t テーブル名 > backup.sql
drop table テーブル名
psql データベース名 < backup.sql
おすすめ記事
2014/12/11
category:Postgres
2013/03/10
category:Postgres
2013/02/01
category:Postgres
2013/07/05
category:Postgres
2013/05/28
category:Postgres
2013/04/03
category:Postgres
2013/01/24
category:Postgres
2013/01/16
category:Postgres
2013/05/06
category:Postgres
2013/07/26
category:Postgres