Re: Is it possible to import raw data directories in a cluster (Debian)?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <J(dot)Kraaijeveld(at)Askesis(dot)nl>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Is it possible to import raw data directories in a cluster (Debian)?
Date: 2011-09-07 15:08:07
Message-ID: 4E6742870200002500040E45@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> wrote:

> During an upgrade of by customer he managed to drop the original
> cluster as the first step. As soon as he saw his error he broke
> off the pg_dropcluster by ctrl-c.

pg_dropcluster is not something provided by the PostgreSQL
community; it seems to be part of the Debian (and related)
distributions. How to recover from an aborted execution of it might
be better directed to the provider, as they may have a better
understanding of the software.

In any event, if the files are recovered to their original
locations, the database should start.

> Of course he has no useful backups,

That should never be an "of course" -- given that hardware can
catastrophically fail at any time, anyone who values their data
should have regular backups with regular tests that the backups can
actually be restored to a working database cluster.

Whether your data is in a database or is a collection of word
processing documents and spreadsheets, this is a fundamental aspect of
using computers.

> But it appears that the directories of the database he wants to
> restore are still on disk and untouched by his upgrade.

What upgrade? I thought you said that pg_dropcluster was what was
run? When you say the directories are "untouched" does that mean
that no files have been deleted from them?

> Is it possible to import the data in the directories somehow so
> that they are fully functional databases?

Import? From what? From the earlier parts of your post it sounded
like you need someone who knows the OS and its utilities to see if
they can recover deleted files. If you can recover them to the
directories from which they were deleted, I would expect the
database cluster to start right up.

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2011-09-07 15:12:43 Re: dump/restore vs vacuum full vs cluster
Previous Message Joost Kraaijeveld 2011-09-07 07:31:52 Re: Is it possible to import raw data directories in a cluster (Debian)?