Re: File system level backup - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: File system level backup
Date
Msg-id jus37f$a3m$1@dough.gmane.org
Whole thread Raw
In response to File system level backup  ("Manoj Agarwal" <ma@ockham.be>)
List pgsql-general
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.




pgsql-general by date:

Previous
From: Lonni J Friedman
Date:
Subject: Re: File system level backup
Next
From: Seref Arikan
Date:
Subject: Re: BI tools and postgresql