0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pg_dump のダンプファイルを作らずに pg_restore する

0
Posted at

パイプを使います。

pg_restoreで復元する場合、カスタム形式またはディレクトリ形式でダンプされている必要があるため、ダンプ時に-Fcや-Fdを指定します。

pg_dump -Fc -d 元DB名 | pg_restore -d 復元先DB名

プレーン SQL 形式でダンプした場合は、psqlで復元します:

pg_dump 元DB名 | psql 復元先DB名
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?