2

My OS is windows 7 x64. I was use postgres 8.4, and all databases are in postgres/8.4/data. Yesterday, I reinstalled my os system, but I found I can't install postgres 8.4 anymore (there is always an error when installing), so I installed postgres 9.1.

But I don't know how to reuse the data of postgres 8.x. I tried to copy the data from postgres/8.4/data to postgres/9.1/data, but the postgres service won't start.

Is there any way to reuse that. Since I have a lot of data in postgres/8.4/data, I can't loose them.

asked Mar 9, 2012 at 1:51
1
  • you might find this by @depesz helpful too Commented Mar 9, 2012 at 9:02

1 Answer 1

1

What you need is a dump / restore. However, for this to work, you need the old PostgreSQL 8.4 server running. The new version 9.1 is not binary compatible and cannot use the files in postgres/8.4/data directly.

If you have no backup and cannot run PostgreSQL 8.4 on your machine any more, you are out of luck. Why is it that you cannot install PostgreSQL 8.4 any more? You'll have to, if you want your data.

On a side note:
It is recommended that you use the pg_dump and pg_dumpall programs from the newer version of PostgreSQL, to take advantage of any enhancements that may have been made in these programs.

answered Mar 9, 2012 at 18:28
1
  • 1
    The OP might be able to install 8.4 on a different machine, and move the data files to it. Then pg_dumpall from 8.4, move the dump files to 9.1, and load them. Commented Apr 10, 2012 at 8:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.