Database recovery

From: Christian Schröder <cs(at)deriva(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Database recovery
Date: 2008-11-10 11:22:47
Message-ID: 49181987.5090602@deriva.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi list,
we have a PostgreSQL 8.2 database on an xfs filesystem. By mistake the
first blocks of this filesystem were overwritten. An xfs_repair
reconstructed the superblock and also found many orphaned files and
directories. Actually, all we have on the filesystem now is in
"lost+found". ;-)
When I look in "lost+found" I have many files that *could* be database
files, but since the original name of the files is unknown I cannot tell
for sure. I have found a directory that looks like the original "data"
directory, with stuff like "postmaster.log", "pg_hba.conf" and even
subdirectories "base", "global" etc. in it. I have been able to start
postgresql from this directory, but when I tried to access the most
important database I got a message that the database directory could not
be found. Indeed, this directory is missing in "base", but there is a
chance that some of the other files might be the original content of
this directory.
Is there any way to find out which of the files is really a postgres
data file? Or even for which database? Although the database file and
page layout are described in the manual, I could not find an exact
description of the file format, e.g. any magic numbers at the beginning
of the file.

Regards,
Christian

--
Deriva GmbH Tel.: +49 551 489500-42
Financial IT and Consulting Fax: +49 551 489500-91
Hans-Böckler-Straße 2 http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-11-10 11:26:13 Re: Fulltext index
Previous Message Ivan Sergio Borgonovo 2008-11-10 11:15:51 Re: psql exit code