Recent Posts

Archives

Blog Ranking

Favorite

ExchangeRate

Update: 2012-05-21 11:00
by ロイター

« メールのスプール | Main | 文字列比較の穴 »

PostgreSQLのdump/restore

By admin | 2 月 21, 2008

 

ボクがよく使うオプションはこれ。

[ dump ]
pg_dump -Ft -U username -h hostname -t tablename databasename > dumpfilename
※-F:アーカイブ形式の指定。「t」はtarアーカイブ。

[ restore ]
pg_restore -c -U username -d databasename dumpfilename
※-c:再作成前にデータベースオブジェクトを削除する。

Topics: PostgreSQL, Server |

 

Comments are closed.