Re: Restore filesystem backup

From: Patrik Strömstedt <patrik(at)digstud(dot)se>
To: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restore filesystem backup
Date: 2008-09-14 15:05:59
Message-ID: 12A1872ACF3A46FE9E8F866FB84BB482@hpx2psxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

Problem solved.

Small "howto" (if someone will end up with the same problem)...

This is all on a "local" system (not on the customers machine).

1) Download and install the "same" PostgreSQL version as the one on the
filesystem dump.
(In my case I had 8.0.1 and I downloaded and installed 8.0.15)

2) Stop the PostgreSQL service

3) Copy all files from the data directory of the filesystem dump, to the
data directory on the newsly installed system.

4) Change the owner of the files/directories to the postgres user (* THIS IS
CRUCIAL *)

5) Start the PostgreSQL service

6) Cross your fingers... (In my case, the old data was available)

Patrik Strömstedt

----- Original Message -----
From: "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Cc: "Patrik Strömstedt" <patrik(at)digstud(dot)se>
Sent: Saturday, September 13, 2008 10:04 PM
Subject: Re: [GENERAL] Restore filesystem backup

On Saturday 13 September 2008 09:07:23 Patrik Strömstedt wrote:
> Hi,
>
> I have a big problem.
>
> The backup (done nightly with pg_dump) at one of our customers sites is
> broken (well, it's overwritten and is of no use anymore). What is left is
> a
> filesystem backup that incudes the postgresql directories.
>
> I'm trying to restore one of the tables from this "filesystem backup"
> (employee_pass (salaries..)), that has been deleted on the live system.
>
> How (if possible), can I use this filesystem backup to restore the
> database
> into a working setup (off-site), from where I can retreive data from the
> one table (employee_pass).
>
> This is on Windows 2000 Server, the Postgres version is 8.01 (I know, it's
> old...)
>

Honestly you have a mess on your hands on a number of different levels. I'd
be
tempted to just try copying the tables files directly between the two
directories if you can matchup the files on disk correctly. Otherwise you
might be forced to try and get some filesystem level tools going, but I'm
not
sure how feasible that is on windows, especially on such an old version.
Good luck.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-09-14 15:09:26 Re: Restore filesystem backup
Previous Message Blazej 2008-09-14 02:24:10 Re: Oracle and Postgresql