Manoj Agarwal wrote on 26.07.2012 12:39:
Hi, I have two virtual machines with two different versions of Postgresql. One machine contains Postgres 7.4.19 and another has Postgres 8.4.3. I also have other instances of these two virtual machines. I need to transfer the database from one machine to other. Both machines contain a database with the same name, for example: testdb, but with different data/values, but the structure is exactly same.
Unrelated: why are you still using 7.3 It was end-of-live 2 years ago. In general: you can *not* just copy files between different versions or servers. The only way this works if both systems are running the exact same version, the exact same operating system and are using the same architecture. (So essentially a cold backup can be used to restore the server where the backup was taken).
It should be possible in Postgres to swap two data directories in two different virtual machines without requiring pg_dump and pg_restore.
No, this is not possible especially not with such an outdated version (I actually consider 8.4 as somewhat "outdated" as well). In your case pg_dump is the only way to go. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general