Skip site navigation (1) Skip section navigation (2)

Re: Filesystem crash - corupted database

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Martin Bednář <bednar(at)triax(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Filesystem crash - corupted database
Date: 2007-09-26 14:45:19
Message-ID: dcc563d10709260745n7f715ecdke8b83918f8f81e05@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On 9/26/07, Martin Bednář <bednar(at)triax(dot)cz> wrote:
> Hi,
>
> It's possible to extract data directly from data files ?
> I have two tablespaces one for data and one for indexes.
> After filesystem crash I lost my /var/lib/postgresql/data folder :( All
> data is in /lost+found :(, I found folders with data and index tablespe
> that looks ok.
> It's possible to directly access these files and extract data as CSV for
> example ?
> Or it's possible "mount" these tablespaces to new database instance ?

You can read them with a hex dump program, but that's about it.  The
data may well be too corrupted to use anyway.  OTOH, if the files are
intact and you can rename them back to what they were you might be
able to get your db back up.  But I wouldn't count on it.

> btw: I know - restore from backups, but DB is too big, and I have
> backups 6days ago.

That's why there's PITR.  If you had been backing up with PITR, then
you could roll forward your standby machine and be right back up.

Use this to make a case to the powers that be that you need better
backup procedures and hardware to handle your data.  The cost of your
data is much higher than the cost of the hardware it lives on.

In response to

pgsql-general by date

Next:From: Raymond O'DonnellDate: 2007-09-26 15:06:18
Subject: Dumping from older version
Previous:From: Tom LaneDate: 2007-09-26 13:50:45
Subject: Re: PQntuples return type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group