2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.14 2000/11/13 23:57:20 momjian Exp $
6 <refentry id="APP-PGDUMPALL">
8 <refentrytitle id="APP-PGDUMPALL-TITLE">
9 <application>pg_dumpall</application>
11 <refmiscinfo>Application</refmiscinfo>
15 <application>pg_dumpall</application>
18 Extract all <productname>Postgres</productname> databases into a script file
23 <date>1999-07-20</date>
26 pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ]
29 <refsect2 id="R2-APP-PG-DUMPALL-1">
31 <date>1998-10-04</date>
37 <application>pg_dumpall</application> accepts the following command line arguments:
44 Dump out only the data, no schema (definitions).
53 Dump data as proper insert strings.
62 Dump data as inserts with attribute names
71 Suppress double quotes around identifiers unless absolutely necessary.
72 This may cause trouble loading this dumped data if there are reserved words
82 Dump object identifiers (<acronym>OID</acronym>s) for every table.
91 Dump out only the schema (definitions), no data.
100 Use password authentication. Prompts for username and password.
109 Specifies verbose mode.
118 Prevent dumping ACLs (grant/revoke commands) and table ownership information.
124 <term>--accounts-only</term>
127 Only dump user and group information, nothing else.
136 <application>pg_dumpall</application> also accepts
137 the following command line arguments for connection parameters:
141 <term>-h <replaceable class="parameter">host</replaceable></term>
144 Specifies the hostname of the machine on which the
145 <application>postmaster</application>
146 is running. If host begins with a slash, it is used
147 as the path to a unix domain socket.
153 <term>-p <replaceable class="parameter">port</replaceable></term>
156 Specifies the Internet TCP/IP port or local Unix domain socket file
157 extension on which the <application>postmaster</application>
158 is listening for connections. The port number defaults to 5432,
159 or the value of the <envar>PGPORT</envar>
160 environment variable (if set).
169 Use password authentication.
171 <replaceable class="parameter">username</replaceable>
172 and <replaceable class="parameter">password</replaceable>.
180 <refsect2 id="R2-APP-PG-DUMPALL-2">
182 <date>1998-10-04</date>
188 <application>pg_dumpall</application> will create a file or
189 write to <filename>stdout</filename>.
193 <term><computeroutput>
194 Connection to database 'template1' failed.
195 connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port '<replaceable class="parameter">port</replaceable>'?
196 </computeroutput></term>
199 <application>pg_dumpall</application> could not attach to the
200 <application>postmaster</application>
201 process on the specified host and port. If you see this message,
202 ensure that the <application>postmaster</application>
203 is running on the proper host and that you have specified the proper
204 port. If your site uses an authentication system, ensure that you
205 have obtained the required authentication credentials.
211 <term><computeroutput>
212 Connection to database '<replaceable class="parameter">dbname</replaceable>' failed.
213 FATAL 1: SetUserId: user '<replaceable class="parameter">username</replaceable>' is not in 'pg_shadow'
214 </computeroutput></term>
217 You do not have a valid entry in the relation <literal>pg_shadow</literal>
218 and and will not be allowed to access <productname>Postgres</productname>.
219 Contact your <productname>Postgres</productname> administrator.
225 <term><computeroutput>
226 dumpSequence(<replaceable class="parameter">table</replaceable>): SELECT failed
227 </computeroutput></term>
230 You do not have permission to read the database.
231 Contact your <productname>Postgres</productname> site administrator.
240 <application>pg_dumpall</application> internally executes
241 <command>SELECT</command> statements. If you have problems running
242 <application>pg_dumpall</application>,
243 make sure you are able to select information from the database using, for
244 example, <application>psql</application>.
250 <refsect1 id="R1-APP-PG-DUMPALL-1">
252 <date>1998-10-04</date>
258 <application>pg_dumpall</application>
259 is a utility for dumping out all Postgres databases into one file.
260 It also dumps the pg_shadow table, which is global to all databases.
261 <application>pg_dumpall</application> includes in this file the proper commands
262 to automatically create each dumped database before loading.
265 <application>pg_dumpall</application> takes all <application>pg_dump</application>
266 options, but <option>-f</option>, <option>-t</option> and
267 <replaceable class="parameter">dbname</replaceable>
272 <xref endterm="app-pgdump-title" linkend="app-pgdump-title">
273 for more information on this capability.
277 <refsect1 id="R1-APP-PG-DUMPALL-2">
279 <date>1998-10-04</date>
285 To dump all databases:
288 $ pg_dumpall > db.out
293 You can use most <application>pg_dump</application> options
294 for <application>pg_dumpall</application>.
299 To reload this database:
302 $ psql -e template1 < db.out
307 You can use most <application>psql</application> options
314 <!-- Keep this comment at the end of the file
319 sgml-minimize-attributes:nil
320 sgml-always-quote-attributes:t
323 sgml-parent-document:nil
324 sgml-default-dtd-file:"../reference.ced"
325 sgml-exposed-tags:nil
326 sgml-local-catalogs:"/usr/lib/sgml/catalog"
327 sgml-local-ecat-files:nil