Re: help... lost database after upgrade from 9.0 to 9.1 - Mailing list pgsql-general

From Radosław Smogura
Subject Re: help... lost database after upgrade from 9.0 to 9.1
Date
Msg-id 1490c04af87d6fd02be9b2c522217eb5@mail.softperience.eu
Whole thread Raw
In response to help... lost database after upgrade from 9.0 to 9.1  (Bruno Boettcher <bboett@bboett.adlp.org>)
List pgsql-general
On Wed, 4 Jan 2012 15:50:25 +0100, Bruno Boettcher wrote:
> Hello!
>
> just made a stupid move... upgraded a working system.... and without
> checking if the backup was ok....
>
> so i end up with a debian system having upgraded to 9,1 without
> converting the database, and a scrambled backup which is totally
> unusable....
>
> i tried to start the old tree with
> pg_ctlcluster 9.0 main start
> Error: could not exec   start -D /var/lib/postgresql/9.0/main -l
> /var/log/postgresql/postgresql-9.0-main.log -s -o  -c
> config_file="/etc/postgresql/9.0/main/postgresql.conf" :
>
>
> so i tried to copy the old 9.0 tree to a machine with a still working
> 9,0
> postgres, but it stops with
> Starting PostgreSQL 9.0 database server: mainError: could not exec
> /usr/lib/postgresql/9.0/bin/pg_ctl /usr/lib/postgresql/9.0/bin/pg_ctl
> start -D /var/lib/postgresql/9.0/main -l
> /var/log/postgresql/postgresql-9.0-main.log -s -o -c
> config_file="/etc/postgresql/9.0/main/postgresql.conf" : ... failed!
>  failed!
>
>
>  so what can i do to extract the data of that tree and feed it into
> the
>  9.1 tree?
>
>  thanks in avance!
> --
> ciao bboett
> ==============================================================
> bboett@adlp.org
> http://inforezo.u-strasbg.fr/~bboett/
> ===============================================================
If you have your data directory copy it first (just for backup) and
install previous version of PostgreSQL, you may make this by
* apt (I use Gentoo)
* some precompiled packages
* compiling compatible previous version from sources

In last two cases, and probably in 1st too, You may need to manually
start PG system by invoking pg server with appropriate command
parameters (mainly cluster directory I think -D).

Personally I was in such situation and I made this what above, plus I
changed port number in configuration to different, launched PostgreSQL
in single-user mode and taken backup connecting to server at new port,
then imported backup to new version.

Regards,
Radek
http://softperience.eu

pgsql-general by date:

Previous
From: Birta Levente
Date:
Subject: Re: Postgresql 9.1 logging
Next
From: Bruno Boettcher
Date:
Subject: Re: help... lost database after upgrade from 9.0 to 9.1