howto restore from pg_dumpall

From: "Marc Fromm" <Marc(dot)Fromm(at)wwu(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: howto restore from pg_dumpall
Date: 2008-03-16 19:46:25
Message-ID: 81FEAB8CDDC62B42B6E8AA258228BC88047417DA@EVS2.univ.dir.wwu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

When I restore from a pg_dumpall file, I am required to peform the following steps or else all the records in the databses are duplicated. If I only empty the data/base folder I get al sorts of errors. I find in necessary to wipe the entire data folder and rebuild it with initdb. Is there a better way to restore using a pg_dumpall file then doing all these steps:

* stop postmaster service
* delete everything in the data folder (var/lib/pgsql/data)
* as postgres user run initdb
* exit postgres user
* psql -U postgres -f pg_dumpall_file postgres

thansk

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2008-03-16 22:05:44 Re: howto restore from pg_dumpall
Previous Message Tom Lane 2008-03-14 15:17:31 Re: Database conversion type serial question