Backup and Restore
When your database schema relies on OIDs (for instance as foreign
keys) you must instruct
pg_dump> to dump the OIDs
as well. To do this, use the command line
- option. Large objects> are not dumped by default, either.
- See
pg_dump>'s command reference page if you use
- large objects.
+ option. Large objects> are not dumped by default,
+ either. See 's reference page if you
+ use large objects.
pg_dump -Fc dbname > filename
- See the
pg_dump> and pg_restore> reference pages for details.
+ See the
and
+ linkend="app-pgrestore"> reference pages for details.
- Please familiarize yourself with the
- pg_dump>> reference page.
+ Please familiarize yourself with the
+ reference page.
-
+
Create the database before restoring into it. (When this
option is used, the database named with is
- used only to issue the initial <literal>CREATE DATABASE>
+ used only to issue the initial <command>CREATE DATABASE>
command. All data is restored into the database name that
appears in the archive.)
internally executes
SQL statements. If you have
problems running
pg_restore, make sure
you are able to select information from the database using, for
- example, <application>psql>.
+ example, <xref linkend="app-psql">.
A user's attributes can be modified after creation with
- See the reference pages for CREATE USER and
- ALTER USER for details.
+ See the reference pages for the
+ endterm="sql-createuser-title"> and
+ endterm="sql-alteruser-title"> commands for details.