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.

