RE: Help with Database Recovery

From: "Hancock, David (DHANCOCK)" <DHANCOCK(at)arinc(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: RE: Help with Database Recovery
Date: 2000-11-30 17:57:09
Message-ID: 09328AED5429D311A3000008C7911B1007CF7C12@exanpmb1.arinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)arinc(dot)com | 410-266-4384

Cheers!
--
David Hancock | dhancock(at)arinc(dot)com | 410-266-4384

-----Original Message-----
From: Lamar Owen [mailto:lamar(dot)owen(at)wgcr(dot)org]
Sent: Thursday, November 30, 2000 12:23 PM
To: Hancock, David (DHANCOCK)
Cc: 'pgsql-general(at)postgresql(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-30 18:06:10 Re: Unanswered questions about Postgre
Previous Message The Hermit Hacker 2000-11-30 17:48:43 Re: Can PostGreSQL handle 100 user database?