1
1
<!--
2
- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.31 2002/08/27 03:55:17 momjian Exp $
2
+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.32 2002/08/27 18:57:26 petere Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -12,18 +12,13 @@ PostgreSQL documentation
12
12
13
13
<refnamediv>
14
14
<refname>pg_dumpall</refname>
15
- <refpurpose>extract all <productname>PostgreSQL</productname> databases into a script file</refpurpose>
15
+ <refpurpose>extract a <productname>PostgreSQL</productname> database cluster into a script file</refpurpose>
16
16
</refnamediv>
17
17
18
18
<refsynopsisdiv>
19
19
<cmdsynopsis>
20
20
<command>pg_dumpall</command>
21
- <group><arg>-c</arg><arg>--clean</arg></group>
22
- <group><arg>-g</arg><arg>--globals-only</arg></group>
23
- <arg>-h <replaceable>host</replaceable></arg>
24
- <arg>-p <replaceable>port</replaceable></arg>
25
- <arg>-U <replaceable>username</replaceable></arg>
26
- <arg>-W</arg>
21
+ <arg rep="repeat"><replaceable>options</replaceable></arg>
27
22
</cmdsynopsis>
28
23
</refsynopsisdiv>
29
24
@@ -66,97 +61,161 @@ PostgreSQL documentation
66
61
The SQL script will be written to the standard output. Shell
67
62
operators should be used to redirect it into a file.
68
63
</para>
69
-
70
-
71
- <para>
72
- <application>pg_dumpall</application> will need to connect several times to the
73
- <productname>PostgreSQL</productname> server, asking for the password each
74
- time. It will probably be very convenient to have a PGPASSWORDFILE in that case.
75
- </para>
76
-
77
64
</refsect1>
78
65
79
66
<refsect1>
80
67
<title>Options</title>
81
68
82
- <para>
83
- <application>pg_dumpall</application> accepts the following
84
- command line arguments:
69
+ <para>
70
+ The following command-line options are used to control the output format.
85
71
86
- <variablelist>
87
- <varlistentry>
88
- <term>-c, --clean</term>
89
- <listitem>
90
- <para>
72
+ <variablelist>
73
+ <varlistentry>
74
+ <term>-c, --clean</term>
75
+ <listitem>
76
+ <para>
91
77
Include SQL commands to clean (drop) database objects before
92
78
recreating them. (This option is fairly useless, since the
93
79
output script expects to create the databases themselves;
94
80
they would always be empty upon creation.)
95
- </para>
96
- </listitem>
97
- </varlistentry>
98
-
99
- <varlistentry>
100
- <term>-g, --globals-only</term>
101
- <listitem>
102
- <para>
81
+ </para>
82
+ </listitem>
83
+ </varlistentry>
84
+
85
+ <varlistentry>
86
+ <term><option>-d</option></term>
87
+ <term><option>--inserts</option></term>
88
+ <listitem>
89
+ <para>
90
+ Dump data as <command>INSERT</command> commands (rather
91
+ than <command>COPY</command>). This will make restoration very
92
+ slow, but it makes the output more portable to other RDBMS
93
+ packages.
94
+ </para>
95
+ </listitem>
96
+ </varlistentry>
97
+
98
+ <varlistentry>
99
+ <term><option>-D</option></term>
100
+ <term><option>--column-inserts</option></term>
101
+ <term><option>--attribute-inserts</option></term>
102
+ <listitem>
103
+ <para>
104
+ Dump data as <command>INSERT</command> commands with explicit
105
+ column names (<literal>INSERT INTO
106
+ <replaceable>table</replaceable>
107
+ (<replaceable>column</replaceable>, ...) VALUES
108
+ ...</literal>). This will make restoration very slow,
109
+ but it is necessary if you desire to rearrange column ordering.
110
+ </para>
111
+ </listitem>
112
+ </varlistentry>
113
+
114
+ <varlistentry>
115
+ <term>-g, --globals-only</term>
116
+ <listitem>
117
+ <para>
103
118
Only dump global objects (users and groups), no databases.
104
- </para>
105
- </listitem>
106
- </varlistentry>
107
-
108
- <varlistentry>
109
- <term>-h <replaceable>host</replaceable></term>
110
- <listitem>
111
- <para>
119
+ </para>
120
+ </listitem>
121
+ </varlistentry>
122
+
123
+ <varlistentry>
124
+ <term><option>-i</></term>
125
+ <term><option>--ignore-version</></term>
126
+ <listitem>
127
+ <para>
128
+ Ignore version mismatch between
129
+ <application>pg_dumpall</application> and the database server.
130
+ Since <application>pg_dumpall</application> knows a great deal
131
+ about system catalogs, any given version of
132
+ <application>pg_dumpall</application> is only intended to work
133
+ with the corresponding release of the database server. Use
134
+ this option if you need to override the version check (and if
135
+ <application>pg_dumpall</application> then fails, don't say
136
+ you weren't warned).
137
+ </para>
138
+ </listitem>
139
+ </varlistentry>
140
+
141
+ <varlistentry>
142
+ <term><option>-o</></term>
143
+ <term><option>--oids</></term>
144
+ <listitem>
145
+ <para>
146
+ Dump object identifiers (<acronym>OID</acronym>s) for every
147
+ table. Use this option if your application references the OID
148
+ columns in some way (e.g., in a foreign key constraint).
149
+ Otherwise, this option should not be used.
150
+ </para>
151
+ </listitem>
152
+ </varlistentry>
153
+
154
+ <varlistentry>
155
+ <term><option>-v</></term>
156
+ <term><option>--verbose</></term>
157
+ <listitem>
158
+ <para>
159
+ Specifies verbose mode. This will cause
160
+ <application>pg_dumpall</application> to print progress
161
+ messages to standard error.
162
+ </para>
163
+ </listitem>
164
+ </varlistentry>
165
+ </variablelist>
166
+ </para>
167
+
168
+ <para>
169
+ The following command-line options control the database connection parameters.
170
+
171
+ <variablelist>
172
+ <varlistentry>
173
+ <term>-h <replaceable>host</replaceable></term>
174
+ <listitem>
175
+ <para>
112
176
Specifies the host name of the machine on which the database
113
177
server is running. If host begins with a slash, it is used as
114
178
the directory for the Unix domain socket. The default is
115
179
taken from the <envar>PGHOST</envar> environment variable, if
116
180
set, else a Unix domain socket connection is attempted.
117
- </para>
118
- </listitem>
119
- </varlistentry>
120
-
121
- <varlistentry>
122
- <term>-p <replaceable>port</replaceable></term>
123
- <listitem>
124
- <para>
181
+ </para>
182
+ </listitem>
183
+ </varlistentry>
184
+
185
+ <varlistentry>
186
+ <term>-p <replaceable>port</replaceable></term>
187
+ <listitem>
188
+ <para>
125
189
The port number on which the server is listening. Defaults to
126
190
the <envar>PGPORT</envar> environment variable, if set, or a
127
191
compiled-in default.
128
- </para>
129
- </listitem>
130
- </varlistentry>
131
-
132
- <varlistentry>
133
- <term>-U <replaceable>username</replaceable></term>
134
- <listitem>
135
- <para>
192
+ </para>
193
+ </listitem>
194
+ </varlistentry>
195
+
196
+ <varlistentry>
197
+ <term>-U <replaceable>username</replaceable></term>
198
+ <listitem>
199
+ <para>
136
200
Connect as the given user.
137
- </para>
138
- </listitem>
139
- </varlistentry>
140
-
141
- <varlistentry>
142
- <term>-W</term>
143
- <listitem>
144
- <para>
201
+ </para>
202
+ </listitem>
203
+ </varlistentry>
204
+
205
+ <varlistentry>
206
+ <term>-W</term>
207
+ <listitem>
208
+ <para>
145
209
Force a password prompt. This should happen automatically if
146
210
the server requires password authentication.
147
- </para>
148
- </listitem>
149
- </varlistentry>
211
+ </para>
212
+ </listitem>
213
+ </varlistentry>
150
214
</variablelist>
151
215
</para>
152
216
153
217
<para>
154
- Any other command line parameters are passed to the underlying
155
- <xref linkend="app-pgdump">
156
- calls. This is useful to control some aspects of the output
157
- format, but some options such as <option>-f</option>,
158
- <option>-F</option>, <option>-t</option>, and <replaceable
159
- class="parameter">dbname</replaceable> should be avoided.
218
+ Long options are only available on some platforms.
160
219
</para>
161
220
</refsect1>
162
221
@@ -180,6 +239,26 @@ PostgreSQL documentation
180
239
</refsect1>
181
240
182
241
242
+ <refsect1>
243
+ <title>Notes</title>
244
+
245
+ <para>
246
+ Since <application>pg_dumpall</application> calls
247
+ <application>pg_dump</application> internally, some diagnostic
248
+ messages will refer to <application>pg_dump</application>.
249
+ </para>
250
+
251
+ <para>
252
+ <application>pg_dumpall</application> will need to connect several
253
+ times to the <productname>PostgreSQL</productname> server. If password
254
+ authentication is configured, it will ask for a password each time. In
255
+ that case it would be convenient to set up a password file.
256
+ </para>
257
+
258
+ <comment>But where is that password file documented?</comment>
259
+ </refsect1>
260
+
261
+
183
262
<refsect1 id="app-pg-dumpall-ex">
184
263
<title>Examples</title>
185
264
<para>
0 commit comments