Re: Database recovery after fs crash

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: J(dot)Henning(at)t-online(dot)de, pgsql-general(at)postgresql(dot)org
Subject: Re: Database recovery after fs crash
Date: 2003-08-27 11:56:05
Message-ID: 20030827115605.GC17755@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 26, 2003 at 09:31:09AM -0400, Alvaro Herrera Munoz wrote:
> On Tue, Aug 26, 2003 at 10:17:48AM +1000, Martijn van Oosterhout wrote:
> > Wow. Take to pull out those backups...
> >
> > Hmm, presumably you don't have those. There are programs to read postgresql
> > data files however they need to know the exact structure of the table before
> > you can even start to decode them. I usually start by browsing files by hand
> > to see if I can determine from any embedded text which table it was.
>
> Hm, you fail to mention your own pgfsck tool. I wonder why. I have not
> tried it myself, but sounds like it can be handy.

That's because it's a bit too far for that. pgfsck is good for recovering
data from corrupted files, but it relies on the system tables being intact.

In theory, it should be possible to write a program to point at a bunch of
files, test each file against the known structures of various system tables
and use that to reconstruct the rest. Nice idea, but not something I have
the time to implement (I have daily offsite backups now :) )

In this case it could be used once you have reconstructed the tables in a
new system and use -r to dump the data.

> IIRC it should be in http://svana.org/kleptog somewhere.

Yep.

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2003-08-27 12:05:02 Re: SQL Command - To List Tables ?
Previous Message sector119 2003-08-27 11:51:42 Re: SQL Command - To List Tables ?