Re: PG_RESTORE/DUMP Question

From: Ken Godee <ken(at)perfect-image(dot)com>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PG_RESTORE/DUMP Question
Date: 2003-10-30 03:17:07
Message-ID: 3FA082B3.9030801@perfect-image.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex wrote:
> 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 ?
>
> Thanks for any advise
> Alex

Probally a point for debate, but sure, why not.
I would create the database in it's own directory as to not
mix things up on both machines ie. export PGDATA2=/usr/local/database
Then just make sure you stop postgres when copying from or to on each
machine.
If someone doesn't think this will work, I'd like to know.
One of my backup routines depends on this kind of proceedure.
Of coarse I've got pg_dumps as well too. :)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rick Gigger 2003-10-30 03:36:24 Transaction Performance Question
Previous Message Allen Landsidel 2003-10-30 02:05:23 pg_ctl vs full restart