Thread: converting an old databaes to postgresql 8.1

converting an old databaes to postgresql 8.1

From
Roger D Vargas
Date:
After a reinstall, I lost my most recent backup in sql format and
instead I have the database directory. The big problem is that it is in
some old format, 8.1 doesnt accept it and 8.0.15 neither. Is there any
way to convert suchdatabase files to the recent format?

--
Roger D. Vargas
Using Gentoo Linux 2008.0, Ogre 1.6.2, fglrx
Powered by Celeron D 2.8 Ghz, 2Gb RAM, Radeon HD4770
http://dsgp.blogspot.com


Re: converting an old databaes to postgresql 8.1

From
Frank Bax
Date:
Roger D Vargas wrote:
> After a reinstall, I lost my most recent backup in sql format and
> instead I have the database directory. The big problem is that it is in
> some old format, 8.1 doesnt accept it and 8.0.15 neither. Is there any
> way to convert such database files to the recent format?



YES, install the same version that was used to create the database; then
create another backup.  The database directory should have a file called
PG_VERSION which contains this version number.

Re: converting an old databaes to postgresql 8.1

From
Sean Davis
Date:


On Mon, Aug 3, 2009 at 5:46 PM, Frank Bax <fbax@sympatico.ca> wrote:
Roger D Vargas wrote:
After a reinstall, I lost my most recent backup in sql format and
instead I have the database directory. The big problem is that it is in
some old format, 8.1 doesnt accept it and 8.0.15 neither. Is there any
way to convert such database files to the recent format?



YES, install the same version that was used to create the database; then create another backup.  The database directory should have a file called PG_VERSION which contains this version number.

Just a detail, but if I am not mistaken, you should use the pg_dump from the NEW version (the target version) running against the database running on the older version.  In other words, reinstall the old version and get it up and running.  Then use the pg_dump from the NEW version to do the pg_dump.  Stop the old server, start the new server, and do the restore using the new server.

Sean