Skip site navigation (1) Skip section navigation (2)

Backup / restore procedure documentation

From: Havard Eidnes <he(at)uninett(dot)no>
To: pgsql-docs(at)postgresql(dot)org
Subject: Backup / restore procedure documentation
Date: 2003-07-24 13:25:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs

I'm a postresql novice but otherwise a Unix system administrator.  I
recently upgraded one of my postgresql installations from 7.2.2 to
7.3.3, and saved the pg_dumpall output for reload after the upgrade.

However, I find that the documentation of the restore procedure as
found in sections 9.1.1 and 9.1.2 in and of itself to be inadequate.
The procedure in 9.1.2 says "can be restored with psql as described
above", referring to section 9.1.1, which says:

 psql dbname < infile                                                           

The text in 9.1.2 fails to mention where "dbname" is to be taken from
in this context.

The exact procedure one need to follow is however documented in
section 1.4, where it is specified that you need to use the
"template1" database when restoring a full database dump, like so:
 /usr/local/pgsql/bin/psql -d template1 -f outputfile                           

Attempts at doing

  psql < outputfile

(which I incorrectly assumed would do the right thing) with a
newly-initialized database system just stonewalled me with

psql: FATAL:  Database "pgsql" does not exist in the system catalog.

I think the documentation in section 9.1.2 should be improved to
better reflect the required procedure as described in section 1.4,
and/or a cross reference should be given, so that this information
can be more easily found.


- HÃ¥vard


pgsql-docs by date

Next:From: Devrim GUNDUZDate: 2003-07-26 15:35:30
Subject: Could you please apply to CVS and to web: Semi-updated Turkish FAQ
Previous:From: Bruce MomjianDate: 2003-07-23 16:55:51
Subject: Re: Preemptive FAQ patches for 7.3.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group