1 <REFENTRY ID="APP-PG-DUMPALL">
4 <application>pg_dumpall</application>
6 <REFMISCINFO>Application</REFMISCINFO>
10 <application>pg_dumpall</application>
13 Extract all <productname>Postgres</productname> databases into a script file
18 <DATE>1998-10-04</DATE>
22 pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ]
23 [ -a ] [ -d ] [ -D ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ]
26 <REFSECT2 ID="R2-APP-PG-DUMPALL-1">
28 <DATE>1998-10-04</DATE>
34 <application>pg_dumpall</application> accepts the following command line arguments:
43 Dump out only the data, no schema (definitions).
53 Dump data as proper insert strings.
64 Dump data as inserts with attribute names
75 Suppress double quotes around identifiers unless absolutely necessary.
76 This may cause trouble loading this dumped data if there are reserved words
88 Dump object identifiers (<acronym>OID</acronym>s) for every table.
99 Dump out only the schema (definitions), no data.
110 Use password authentication. Prompts for username and password.
121 Specifies verbose mode
132 Prevent dumping ACLs (grant/revoke commands) and table ownership information.
140 <application>pg_dumpall</application> also accepts
141 the following command line arguments for connection parameters:
146 -h <replaceable class="parameter">host</replaceable>
150 Specifies the hostname of the machine on which the
151 <application>postmaster</application>
152 is running. Defaults to using a local Unix domain socket
153 rather than an IP connection..
160 -p <replaceable class="parameter">port</replaceable>
164 Specifies the Internet TCP/IP port or local Unix domain socket file
165 extension on which the <application>postmaster</application>
166 is listening for connections. The port number defaults to 5432,
167 or the value of the <envar>PGPORT</envar>
168 environment variable (if set).
179 Use password authentication.
181 <replaceable class="parameter">username</replaceable>
182 and <replaceable class="parameter">password</replaceable>.
190 <REFSECT2 ID="R2-APP-PG-DUMPALL-2">
192 <DATE>1998-10-04</DATE>
198 <application>pg_dumpall</application> will create a file or
199 write to <filename>stdout</filename>.
204 Connection to database 'template1' failed.
205 connectDB() failed: Is the postmaster running and accepting connections
206 at 'UNIX Socket' on port '<replaceable class="parameter">port</replaceable>'?
210 <application>pg_dumpall</application> could not attach to the
211 <application>postmaster</application>
212 process on the specified host and port. If you see this message,
213 ensure that the <application>postmaster</application>
214 is running on the proper host and that you have specified the proper
215 port. If your site uses an authentication system, ensure that you
216 have obtained the required authentication credentials.
223 Connection to database '<replaceable class="parameter">dbname</replaceable>' failed.
224 FATAL 1: SetUserId: user '<replaceable class="parameter">username</replaceable>' is not in 'pg_shadow'
228 You do not have a valid entry in the relation <literal>pg_shadow</literal>
229 and and will not be allowed to access <productname>Postgres</productname>.
230 Contact your <productname>Postgres</productname> administrator.
237 dumpSequence(<replaceable class="parameter">table</replaceable>): SELECT failed
241 You do not have permission to read the database.
242 Contact your <productname>Postgres</productname> site administrator.
251 <application>pg_dumpall</application> internally executes
252 <command>SELECT</command> statements. If you have problems running
253 <application>pg_dumpall</application>,
254 make sure you are able to select information from the database using, for
255 example, <application>psql</application>.
261 <REFSECT1 ID="R1-APP-PG-DUMPALL-1">
263 <DATE>1998-10-04</DATE>
269 <application>pg_dumpall</application>
270 is a utility for dumping out all Postgres databases into one file.
271 It also dumps the pg_shadow table, which is global to all databases.
272 <application>pg_dumpall</application> includes in this file the proper commands
273 to automatically create each dumped database before loading.
276 <application>pg_dumpall</application> takes all <application>pg_dump</application>
277 options, but <option>-f</option>, <option>-t</option> and
278 <replaceable class="parameter">dbname</replaceable>
283 <xref linkend="app-pg-dump" endterm="pg-dump">
284 for more information on this capability.
288 <REFSECT1 ID="R1-APP-PG-DUMPALL-2">
290 <DATE>1998-10-04</DATE>
296 To dump all databases:
299 % pg_dumpall -o > db.out
304 You can use most <application>pg_dump</application> options
305 for <application>pg_dumpall</application>.
310 To reload this database:
313 psql -e template1 < db.out
318 You can use most <application>psql</application> options