Re: Database recovery after fs crash - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Database recovery after fs crash
Date
Msg-id 20030827114723.GB17755@svana.org
Whole thread Raw
In response to Re: Database recovery after fs crash  (J.Henning@t-online.de)
Responses Re: Database recovery after fs crash  (J.Henning@t-online.de)
List pgsql-general
On Tue, Aug 26, 2003 at 02:18:28PM +0200, J.Henning@t-online.de wrote:
> > Hmm, presumably you don't have those.
>
> Unfortunately not. All backup measures I took failed on the exact same
> occasion - worst case possible.

Ouch!

> > I usually start by browsing files by hand to see if I can determine
> > from any embedded text which table it was.
>
> Seems easy enough.

Can be tricky depending on the data.

> > Then if you create a new database and recreate the table *exactly* the
> > same and then copy the datafile over. You might need to create some
> > clog files but you *might* be able to recover some data.
>
> How do I do that? I don't know the format of the clog files. The only
> information I found was in clog.h and xlog.h.

xlog is fairly easy, I think resetxlog or something can work there. For clog
I just noted from the logs which clog files it was missing and created them
filled with either 0x00 or 0x55 (I forget if it make a difference) and kept
going until done.

Good luck.
--
Martijn van Oosterhout   <kleptog@svana.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

Attachment

pgsql-general by date:

Previous
From: sector119@mail.ru
Date:
Subject: Re: SQL Command - To List Tables ?
Next
From: Paul Thomas
Date:
Subject: Re: SQL Command - To List Tables ?