X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5FC4DD1C941 for ; Thu, 24 Jul 2003 13:25:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 39103-03 for ; Thu, 24 Jul 2003 10:25:00 -0300 (ADT) Received: from smistad.uninett.no (smistad.uninett.no [158.38.62.77]) by svr1.postgresql.org (Postfix) with ESMTP id 21DD2D1C944 for ; Thu, 24 Jul 2003 10:25:39 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by smistad.uninett.no (Postfix) with ESMTP id 3C9B8292C2 for ; Thu, 24 Jul 2003 15:25:42 +0200 (CEST) Date: Thu, 24 Jul 2003 15:25:42 +0200 (CEST) Message-Id: <20030724.152542.107639297.he@uninett.no> To: pgsql-docs@postgresql.org Subject: Backup / restore procedure documentation From: Havard Eidnes X-Mailer: Mew version 1.95b124 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/12 X-Sequence-Number: 1859 Hi, 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=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 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: =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 /usr/local/pgsql/bin/psql -d template1 -f outputfile=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 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. Regards, - H=E5vard