Thread: upgrade

upgrade

From
"Peter T. Brown"
Date:
I have upgraded from PostgreSQL 7.0.2 to 7.1beta4. I am trying to convert a
database from the older version to work in the newer version. Unfortunately
ALL I have is the base directory zipped up containing all the tables, keys,
sequences, etc. Is there a way to convert this and have it work with
7.1beta? At the very least, is there a way for me to use a 7.0.2
installation to reinstate this database and use pg_dumpall?

Thanks very much for any help!

----
Peter T. Brown
Director of Technology
Memetic Systems
"Intelligent. Customer Acquisition & Retention."
206.985.7171 ext. 110



Re: upgrade

From
"Oliver Elphick"
Date:
"Peter T. Brown" wrote:
  >I have upgraded from PostgreSQL 7.0.2 to 7.1beta4. I am trying to convert a
  >database from the older version to work in the newer version. Unfortunately
  >ALL I have is the base directory zipped up containing all the tables, keys,
  >sequences, etc. Is there a way to convert this and have it work with
  >7.1beta? At the very least, is there a way for me to use a 7.0.2
  >installation to reinstate this database and use pg_dumpall?

You have to use 7.0.x to read the 7.0 database.

Restore a 7.0.x installation.
Unzip your data directory back to its proper place.
Use 7.0.x pg_dumpall to save your data to a flat file.
Remove your data directory
Install 7.1x
Run initdb to create a new database structure.
Use psql to read in the flat file dump and recreate your data.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "These things have I written unto you that believe on
      the name of the Son of God; that ye may know that ye
      have eternal life, and that ye may believe on the name
      of the Son of God."        I John 5:13



Re: upgrade

From
Tom Lane
Date:
"Peter T. Brown" <peter@memeticsystems.com> writes:
> I have upgraded from PostgreSQL 7.0.2 to 7.1beta4. I am trying to convert a
> database from the older version to work in the newer version. Unfortunately
> ALL I have is the base directory zipped up containing all the tables, keys,
> sequences, etc.

You mean just $PGDATA/base?  Not all of $PGDATA?  If so, sorry, but you
are flat outa luck.  You should've saved pg_log too...

            regards, tom lane