mirror of
https://github.com/postgres/postgres.git
synced 2025-06-04 00:02:37 -04:00
Improve description of restoring pg_dumpall backups, per gripe from
Havard Eidnes.
This commit is contained in:
parent
c4cf7fb814
commit
eb06e6d182
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.26 2003/03/24 14:32:50 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.27 2003/08/01 01:01:52 tgl Exp $
|
||||||
-->
|
-->
|
||||||
<chapter id="backup">
|
<chapter id="backup">
|
||||||
<title>Backup and Restore</title>
|
<title>Backup and Restore</title>
|
||||||
@ -163,16 +163,21 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
|
|||||||
up an entire database cluster. For this reason the
|
up an entire database cluster. For this reason the
|
||||||
<application>pg_dumpall</> program is provided.
|
<application>pg_dumpall</> program is provided.
|
||||||
<application>pg_dumpall</> backs up each database in a given
|
<application>pg_dumpall</> backs up each database in a given
|
||||||
cluster and also makes sure that the state of global data such as
|
cluster, and also preserves cluster-wide data such as
|
||||||
users and groups is preserved. The call sequence for
|
users and groups. The call sequence for
|
||||||
<application>pg_dumpall</> is simply
|
<application>pg_dumpall</> is simply
|
||||||
<synopsis>
|
<synopsis>
|
||||||
pg_dumpall > <replaceable>outfile</>
|
pg_dumpall > <replaceable>outfile</>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
The resulting dumps can be restored with <application>psql</> as
|
The resulting dump can be restored with <application>psql</>:
|
||||||
described above. But in this case it is definitely necessary that
|
<synopsis>
|
||||||
you have database superuser access, as that is required to restore
|
psql template1 < <replaceable class="parameter">infile</replaceable>
|
||||||
the user and group information.
|
</synopsis>
|
||||||
|
(Actually, you can specify any existing database name to start from,
|
||||||
|
but if you are reloading in an empty cluster then <literal>template1</>
|
||||||
|
is the only available choice.) It is always necessary to have
|
||||||
|
database superuser access when restoring a <application>pg_dumpall</>
|
||||||
|
dump, as that is required to restore the user and group information.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -260,7 +265,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c
|
|||||||
<para>
|
<para>
|
||||||
<application>pg_dump</> (and by implication
|
<application>pg_dump</> (and by implication
|
||||||
<application>pg_dumpall</>) has a few limitations which stem from
|
<application>pg_dumpall</>) has a few limitations which stem from
|
||||||
the difficulty to reconstruct certain information from the system
|
the difficulty of reconstructing certain information from the system
|
||||||
catalogs.
|
catalogs.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user