Re: PG_RESTORE/DUMP Question

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG_RESTORE/DUMP Question
Date: 2003-10-29 14:01:47
Message-ID: m33cdcp2gk.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex <alex(at)meerkatsoft(dot)com> writes:

> Hi,
>
> I have a test system that is setup the same as a production system and
> would like to frequently copy the database over.
> pg_dump takes a few hours and even sometimes hangs.
>
> Are there any reasons not to simply just copy the entire data
> directory over to the test system? I could not find any postings on
> the net suggesting otherwise. Is there anything to pay attention too ?

If the two systems are the same architecture and OS, this can work,
but in order to get a consistent copy, you need to either:

a) Stop (completely shut down) the source database while the copy
runs, or
b) Use volume management and take a snapshot of the source database,
them copy the snapshot over. This will lose open transactions but
will be otherwise consistent.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-10-29 14:03:38 Re: PG_RESTORE/DUMP Question
Previous Message Alex 2003-10-29 13:52:02 PG_RESTORE/DUMP Question