Re: Help with Database Recovery - Mailing list pgsql-general

From Lamar Owen
Subject Re: Help with Database Recovery
Date
Msg-id 3A268D0D.5EE59BCF@wgcr.org
Whole thread Raw
In response to Help with Database Recovery  ("Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com>)
List pgsql-general
"Hancock, David (DHANCOCK)" wrote:
> Please--I have searched everywhere I can think of and have found no guidance
> for recovering databases where the /var/lib/pgsql/base directories are
> intact but there's no pg_dump file to work from.  I need to do this because
> I stupidly but inadvertently uninstalled PostgreSQL and then had to
> reinstall it.

> 1. just copy the old base/* directories into the newly created
> /var/lib/pgsql/base directory.  psql was not aware of the databases.
> 2. use createdb to create a database, and then copy the old data files into
> the corresponding base/<db> directory. psql said "couldn't open cache for
> user 40" or something similar.
> 3. modified uid for postgres user to 40, reinstalled PostgreSQL, did "2"
> again, similar result.

If the two PostgreSQL installations are the same major version, then you
copy the entire /var/lib/pgsql tree over.  Not just the base/* trees.

What version, what OS?
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

pgsql-general by date:

Previous
From: Joe Kislo
Date:
Subject: Re: Unanswered questions about Postgre
Next
From: "Dale Anderson"
Date:
Subject: Table & Column descriptions