Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Recovering databases



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group