Re: PG_RESTORE/DUMP Question - Mailing list pgsql-general

From Ken Godee
Subject Re: PG_RESTORE/DUMP Question
Date
Msg-id 3FA082B3.9030801@perfect-image.com
Whole thread Raw
In response to PG_RESTORE/DUMP Question  (Alex <alex@meerkatsoft.com>)
List 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. :)








pgsql-general by date:

Previous
From: Allen Landsidel
Date:
Subject: pg_ctl vs full restart
Next
From: "Rick Gigger"
Date:
Subject: Transaction Performance Question