Re: converting an old databaes to postgresql 8.1

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Frank Bax <fbax(at)sympatico(dot)ca>
Cc: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: converting an old databaes to postgresql 8.1
Date: 2009-08-03 21:56:31
Message-ID: 264855a00908031456v4197283bn181b3eca8d1e933e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Aug 3, 2009 at 5:46 PM, Frank Bax <fbax(at)sympatico(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Alejandro 2009-08-03 22:26:35 Re: Retrieve the primary key of a table
Previous Message Frank Bax 2009-08-03 21:46:29 Re: converting an old databaes to postgresql 8.1