From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Alex <alex(at)meerkatsoft(dot)com> |
Cc: | Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: PG_RESTORE/DUMP Question |
Date: | 2003-11-01 13:33:41 |
Message-ID: | 20031101133341.GA6245@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
The data in the data directory is binary data and is not intended to work
even across different installations on the same machine. To copy the binary
data you'd need at least the global, base, pg_xlog, pg_clog and a few other.
The only thing you may skip may be different database is the base directory.
And even then you're risking a lot. Between linux and solaris I'd expect
various byte boundaries to move so forget transportability.
pg_dump is the only supported way of transporting data around.
On Sat, Nov 01, 2003 at 10:20:42PM +0900, Alex wrote:
> Is it enough to just copy the global and the base directory ?
> Is there any reason the db would not come up if the data is copied form
> solaris to linux or vice versa as long as the db version is the same?
>
> Shridhar Daithankar wrote:
>
> >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 ?
> >
> >
> >Yes. just shutdown production postmaster. Copy the entire data
> >directory over to test system.
> >
> >Two system should be absolutely identical. Same architecture,
> >preferrably same OS, same postgresql client and server version etc.
> >
> >Or investigate some of the asynchronous replication systems. That
> >would save you some time but will affect production performance a bit.
> >
> >HTH
> >
> > Shridhar
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato
From | Date | Subject | |
---|---|---|---|
Next Message | Network Administrator | 2003-11-01 13:56:54 | Re: ALTER Table (another) |
Previous Message | Network Administrator | 2003-11-01 13:22:30 | Re: Best Perl Option? |