Re: Recovering databases

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: Peter Falk <peter(at)nexus(dot)dk>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Recovering databases
Date: 2007-08-20 15:27:54
Message-ID: 46C9B2FA.70409@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Peter Falk wrote:
> The installation is Debian Sarge (3.1). I did a complete update, but
> during this I got the information, that Postgresql has to be upgraded
> separately - can't remember the exact words.
>
> I did this update and to my suprise it installed a version 7.4. Then i
> removed this installation and installed a version 8.1. Afterwards I
> cheched to see the packages installed and recognized, that some
> 7.4-packages still resided om the server.
>
> I there upon (and this is when the big mistake occured) decided to
> remove all PG-packages and do a clean install.
> The misson succeded but the patient died!
>
> At this moment I got a runing PG but without connecion to the old
> databases. The database-files still resides on the server, but I can't
> get PG to recognize them.
>
> I think that the PG-installation prior to the mistake was v. 8.0 - I
> know for sure that it was newer than 7.x

Locate the main version number that was running with the data. If you
where running 8.0 then 8.1 won't read the data files. A dump and restore
is required to transfer data between releases (but not minor updates).

In the data dir you will find a file named PG_VERSION that contains the
version that created the data files.
The data dir will be the one with base and global dir's and have files
such as pg_hba.conf and postgresql.conf
You can also find the same file inside the base dir folders.

Install the newest update to the version found (if PG_VERSION shows 8.0
then install 8.0.13) and then consider whether you want to dump and
restore to a newer version or to stay with that version.

> Regards
> Peter
>
>
> Oliver Elphick skrev:
>> On Mon, 2007-08-20 at 10:35 +0200, Peter Falk wrote:
>>
>>> Hi,
>>> I did some updating on my Linux server and was a bit too efficient.
>>> Databases on the server prior to the update is no longer reachable
>>> from pgsql all though still present on the server. Of course I didn't
>>> do a pg_dump before the update!!!
>>>
>>
>> What precisely did you update? What are the versions involved? Is this
>> a package installation (Red Hat/Debian/etc)? or did you build from
>> source?
>>
>>
>
>

--

Shane Ambler
pgSQL(at)Sheeky(dot)Biz

Get Sheeky @ http://Sheeky.Biz

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2007-08-20 16:50:17 Re: Recovering databases
Previous Message Peter Falk 2007-08-20 12:04:21 Re: Recovering databases