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

From Hancock, David (DHANCOCK)
Subject RE: Help with Database Recovery
Date
Msg-id 09328AED5429D311A3000008C7911B1007CF7C12@exanpmb1.arinc.com
Whole thread Raw
In response to Help with Database Recovery  ("Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com>)
Responses Re: Help with Database Recovery  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Sorry I didn't give more detail.  OS is Linux 2.2 kernel, PostgreSQL is
6.5.3.  The problem is that I copied the .../base/* directories elsewhere in
preparation for making base a symlink to a different filesystem with more
space.  I then screwed up and removed everything in /var/lib/pgsql, not just
the base directories.  This necessitated a reinstall of PostgreSQL.

I know, I know ... it was a very stupid maneuver on my part, but it's a
strange feeling to know that I've GOT the database files, I just can't use
'em.  Yet.

Thanks, and
Cheers!
--
David Hancock | dhancock@arinc.com | 410-266-4384

Cheers!
--
David Hancock | dhancock@arinc.com | 410-266-4384


-----Original Message-----
From: Lamar Owen [mailto:lamar.owen@wgcr.org]
Sent: Thursday, November 30, 2000 12:23 PM
To: Hancock, David (DHANCOCK)
Cc: 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] Help with Database Recovery


"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: "Gordan Bobic"
Date:
Subject: Re: Unanswered questions about Postgre
Next
From: The Hermit Hacker
Date:
Subject: Re: Can PostGreSQL handle 100 user database?