Re: Help with Database Recovery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hancock, David (DHANCOCK)" <DHANCOCK(at)arinc(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with Database Recovery
Date: 2000-11-30 19:24:13
Message-ID: 13011.975612253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Hancock, David (DHANCOCK)" <DHANCOCK(at)arinc(dot)com> writes:
> 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.

Unfortunately, you've only got *part* of the database. The above
maneuver destroyed your pg_log file, which is essential. Without it,
you've got a lot of tuples but you don't know which ones are valid.

If you did a VACUUM just before all this, then there's a reasonable
chance that the tuples you have left are mostly just valid ones.
Otherwise I'd say it's hopeless. In any case you will not be able
to reconstruct data that you can trust except after painstaking
manual examination.

How far back was your last regular whole-file-system backup? Restoring
all of /var/lib/pgsql off that is likely to be your best shot at getting
to a state that's somewhat trustworthy.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2000-11-30 19:29:59 Re: Table & Column descriptions
Previous Message Joel Burton 2000-11-30 19:21:19 Re: Unanswered questions about Postgre