Thread: Re: Data migration from postgres 8.4 to 9.4

Re: Data migration from postgres 8.4 to 9.4

From
Amitabh Kant
Date:
On Mon, Apr 16, 2018 at 12:33 PM, Akshay Ballarpure <akshay.ballarpure@tcs.com> wrote:
Hello,
I need help in using postgresql 8.4 data in postgres 9.4 version. Do I need to run any tool to achieve the same?

Steps i followed is ran postgresql 8.4 and 9.4, copied data from 8.4 instance to 9.4 and try to start postgresql 9.4 but no luck, getting below error.

[root@ms-esmon esm-data]# su - postgres -c "/opt/rh/rh-postgresql94/root/usr/bin/postgres -D /var/ericsson/esm-data/postgresql-data/ 2>&1 &"
[root@ms-esmon esm-data]# LOG:  skipping missing configuration file "/var/ericsson/esm-data/postgresql-data/postgresql.auto.conf"
2018-04-16 06:52:01.546 GMT  FATAL:  database files are incompatible with server
2018-04-16 06:52:01.546 GMT  DETAIL:  The data directory was initialized by PostgreSQL version 8.4, which is not compatible with this version 9.4.9.


With Best Regards
Akshay
Ericsson OSS MON
Tata Consultancy Services
Mailto: akshay.ballarpure@tcs.com
Website:
http://www.tcs.com

You cannot simply copy data between major versions. Look into pg_upgrade utility to upgrade your database, or you could use pg_dump/pg_restore to migrate between major versions.

Amitabh