Postgresql – Moving PostgreSQL database to new server

migrationpostgresql

I had PostgreSQL 8.3 running on a windows machine. The hard drive recently became unbootable, but the data is fine. We got a new machine and I'm re-installing Postgres. The new installer only has version 8.4 and a variety of 9.x releases.

Would I be able to install 8.4 and move the data over with no problems, or do I need to find the 8.3 installer. How about version 9? Is the migration as simple as moving the old "C:\Program Files\PostgreSQL\8.3\data" to the exact same place on the new directory.

Thanks,
Kevin

Best Answer

Upgrading a major version of PostgreSQL (i.e. 8.3 to 8.4) requires a database dump and restore - simply copying in data from an older version will most likely not work.

There are still some copies of 8.3 that you can download from EnterpriseDB to get you going. However it would still be best to upgrade to the later version afterwards if possible.