pg_dumpall

Name

pg_dumpall  --  Extract all Postgres databases into a script file すべてのPostgres データベースを スクリプトファイルに抽出する

Synopsis

pg_dumpall
pg_dumpall [ -h host ] [ -p port ] [ -a ] [ -d ] [ -D ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
  

入力

pg_dumpall accepts the following command line arguments:

pg_dumpall は、以下の コマンドライン引数を認めています:

-a

Dump out only the data, no schema (definitions).

データだけを抽出し、スキーマ (定義)は省かれます。

-d

Dump data as proper insert strings.

データを正しい挿入文として書き出します。

-D

Dump data as inserts with attribute names

データをアトリビュート (属性) 名付きで、挿入文として 書き出します。

-n

Suppress double quotes around identifiers unless absolutely necessary. This may cause trouble loading this dumped data if there are reserved words used for identifiers.

まったく必要が無い場合は、識別子の前後に付けるダブルクォート の出力を行いません。 これにより、もし予約語が識別子として使われている場合、 書き出されたデータを読み込む場合に問題を引き起こすことが あります。

-o

Dump object identifiers (OIDs) for every table.

すべてのテーブルのオブジェクトID (OIDs) を書き出します。

-s

Dump out only the schema (definitions), no data.

データを含まない、スキーマ (定義) だけを書き出します。

-u

Use password authentication. Prompts for username and password.

パスワード認証を使います。ユーザ名とパスワードを 尋ねられます。

-v

Specifies verbose mode

冗長メッセージ (verbose) モードを指定します。

-x

Prevent dumping ACLs (grant/revoke commands) and table ownership information.

アクセスコントロールリスト (ACL:grant/revoke コマンド) と テーブルの所有権に関する情報の書き出しを行いません。

pg_dumpall also accepts the following command line arguments for connection parameters:

pg_dumpall は、コマンドライン引数 として以下の接続パラメータも受け入れます:

-h host

Specifies the hostname of the machine on which the postmaster is running. Defaults to using a local Unix domain socket rather than an IP connection..

postmaster が動作しているホスト名 を指定します。デフォルトは、IP接続よりむしろローカル Unix ドメインソケットを使用します。

-p port

Specifies the Internet TCP/IP port or local Unix domain socket file extension on which the postmaster is listening for connections. The port number defaults to 5432, or the value of the PGPORT environment variable (if set).

postmaster が接続を監視している インターネット TCP/IP ポート、あるいは ローカル Unix ドメインソケットファイル拡張子を指定します。 ポート番号は 5432 か、あるいは (もし設定されている場合は) PGPORT 環境変数の値をデフォルトとします。

-u

Use password authentication. Prompts for username and password.

パスワード認証を使用します。 usernamepassword を 尋ねられます。

出力

pg_dumpall will create a file or write to stdout.

pg_dumpall は、ファイルを作成 するか、stdout に書き出します。

Connection to database 'template1' failed. connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port 'port'?

pg_dumpall could not attach to the postmaster process on the specified host and port. If you see this message, ensure that the postmaster is running on the proper host and that you have specified the proper port. If your site uses an authentication system, ensure that you have obtained the required authentication credentials.

pg_dumpall は、指定されたホストと ポート上にある postmaster に 接続することができませんでした。このメッセージが表示された 場合、postmaster が正しいホスト上 で、指定した正しいポートで動作していることを確認してください。 もし認証システムを使用しているサイトの場合は、必要な認証資格 を持っているか確認してください

Connection to database 'dbname' failed. FATAL 1: SetUserId: user 'username' is not in 'pg_shadow'

You do not have a valid entry in the relation pg_shadow and and will not be allowed to access Postgres. Contact your Postgres administrator.

リレーション pg_shadow に有効な登録が されていないため、Postgres に アクセスすることを許されていません。 Postgres 管理者に連絡を取って ください。

dumpSequence(table): SELECT failed

You do not have permission to read the database. Contact your Postgres site administrator.

データベースを読む権限がありません。 Postgres サイト管理者に連絡を 取ってください。

Note: pg_dumpall internally executes SELECT statements. If you have problems running pg_dumpall, make sure you are able to select information from the database using, for example, psql.

pg_dumpall は、内部的には SELECT 文を実行します。もし、 pg_dumpall 使用時に問題がある場合 は、例えば、 psql を使用して、 データベースから情報を選択することが出来ることを確認して ください。

説明

pg_dumpall is a utility for dumping out all Postgres databases into one file. It also dumps the pg_shadow table, which is global to all databases. pg_dumpall includes in this file the proper commands to automatically create each dumped database before loading.

pg_dumpall は、すべての Postgres データベースを、 ひとつのファイルの中へ書き出すユーティリティです。 また、すべてのデータベースに対して共通なテーブルである pg_shadow も、書き出します。 pg_dumpall は、読み込む前に、 書き出されたそれぞれのデータベースを自動的に作成する コマンドをそのファイルの中に持っています。

pg_dumpall takes all pg_dump options, but -f, -t and dbname should be omitted.

pg_dumpall は、 -f-t、そして dbname を除いた すべての pg_dump のオプションを 受け入れます。

Refer to pg_dump for more information on this capability.

オプションについての詳細は、 pg_dump を参照してください。

使用法

To dump all databases:

すべてのデータベースを書き出す場合、以下のようにします:

% pg_dumpall -o > db.out
   

Tip: You can use most pg_dump options for pg_dumpall.

pg_dumpall には、ほとんどの pg_dump オプションが使用できます。

To reload this database:

上記で書き出したデータベースを読み込む場合、 以下のようにします:

% psql -e template1 < db.out
   

Tip: You can use most psql options when reloading.

読み込みの際、ほとんどの psql オプションが使用できます。