Re: File system level backup

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Manoj Agarwal" <ma(at)ockham(dot)be>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: File system level backup
Date: 2012-08-08 16:45:40
Message-ID: 5022516402000025000494B6@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Manoj Agarwal" <ma(at)ockham(dot)be> wrote:
> From: Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov]
>> "Manoj Agarwal" <ma(at)ockham(dot)be> wrote:

>>> 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.
>>
>>> Take file system level backup from from first machine for
>>> Postgres database 'testdb' and restore it in another instance
>>> that has SAME version of Postgres. i.e. backup the database
>>> 'testdb' from Postgres 7.4.19 and restore it on another virtual
>>> machine with same Postgres version 7.4.19.

That's old, and long out of support.

http://www.postgresql.org/support/versioning/

>> You cannot use file system level copy for individual databases in
>> a cluster.
>
> I have two identical Centos 4.6 Virtual machines with postgresql
> database from different customers. Can't I swap the databases
> between these two machines using file level copy, without
> requiring pg_dump and pg_restore? I don't wish to use file system
> level copy for individual database in a cluster, but as a whole,
> is it possible?

Yes, if you copy the whole database *cluster* (everything under the
the directory you get when you run `show data_directory;` -- you
can't pick individual databases).

Be sure to read this page carefully:

http://www.postgresql.org/docs/7.4/interactive/backup-file.html

-Kevin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2012-08-08 17:13:41 Re: timestamp with timezone and time zone name
Previous Message Seref Arikan 2012-08-08 15:04:28 Re: Using contains operator on arrays that have duplicate elements: feedback request.