Re: hardware failure - data recovery

From: Rick Gigger <rick(at)alpinenetworking(dot)com>
To: Jerry Sievers <jerry(at)jerrysievers(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: hardware failure - data recovery
Date: 2006-10-24 04:21:42
Message-ID: AE90A768-E700-459E-8FB9-258A6E592038@alpinenetworking.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Rick Gigger <rick(at)alpinenetworking(dot)com> writes:
>
>> To make a long story short lets just say that I had a bit of a
>> hardware failure recently.
>>
>> If I got an error like this when trying to dump a db from the mangled
>> data directory is it safe to say it's totally hosed or is there some
>> chance of recovery?
>
> Why don't you try dumping just the critical tables using pg_dump -t?

There was only one table in the db.

> Also perhaps use psql and try looking up in pg_class for the damaged
> tables by OID. You may be able to drop just a few tables and then
> dump the DB normally. This assumes the damaged table(s) are
> non-critical...

The table I needed was damaged. I dropped the indexes from it that
were also damaged but then the table had to be repaired.

> I suggest you stop Pg first, take an FS backup of the entire cluster
> before this so you cahn try various approaches if needed.

That was the first thing I did.

Thanks everyone for the help. Luckily one of my developers was able
to patch up the table and get 99% of the data out. All of the truly
critical data was in another database and was backed up, so the 99%
was enough to get through the crisis.

Thanks,

Rick

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shane Wright 2006-10-24 06:06:32 recovery from xid wraparound
Previous Message Rick Gigger 2006-10-24 04:16:48 Re: hardware failure - data recovery