From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | J(dot)Henning(at)t-online(dot)de |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Database recovery after fs crash |
Date: | 2003-08-27 11:47:23 |
Message-ID: | 20030827114723.GB17755@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Aug 26, 2003 at 02:18:28PM +0200, J(dot)Henning(at)t-online(dot)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(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
From | Date | Subject | |
---|---|---|---|
Next Message | sector119 | 2003-08-27 11:51:42 | Re: SQL Command - To List Tables ? |
Previous Message | Paul Thomas | 2003-08-27 11:46:05 | Re: SQL Command - To List Tables ? |