Re: Corrupted disk

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Tony Nelson <tnelson(at)starpoint(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Corrupted disk
Date: 2011-02-20 16:52:57
Message-ID: 4D6146E9.2030302@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tony Nelson wrote:
> I am ok, because I have a dump from last night, and wal since then.
>

Dumps made with pg_dump are easy to restore from. But they're fixed in
time: there is no applying WALs to them in order to update them.
Anything that's happened to the server since then you can't add.

If you made a filesystem copy of the server using
pg_start_backup/pg_stop_backup, and you save all of the WAL files after
the backup began, that's also useful. You can store from that backup
and apply all the WAL that's happened since then.

> Can I drop/create/restore from this dump? Or should I restore from last nights full and apply the WAL?
>

If last night's backup with a filesystem one done with
pg_start_backup/pg_stop_backup, and you have WAL since then, I would
favor that set as likely to work fine. But it sounds like what you have
might instead be a pg_dump backup and some WAL files; you can't apply
the WAL to such a dump.

Whatever you do, you want to make a full filesystem copy of the server's
data directory--with the server shutdown--before you do anything else.
It's possible to recover from page errors and extract the available data
using the right data recovery techniques, especially if there's a
pg_dump available too; we offer some services in this area. But if any
serious changes are made to the database before we get to it, odds of
successful recovery can drop fast.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Selva manickaraja 2011-02-21 00:42:39 Fwd: Standby function after fail-over
Previous Message Selva manickaraja 2011-02-20 07:24:16 Standby function after fail-over