Thread: Recovery after server crash

Recovery after server crash

From
Chris
Date:
Good afternoon, all:

I recently experienced a server crash.  I have a backup of my Postgesql
data directory.

On rebuilding my machine, I decided to go with i386 instead of my
original AMD64.  That means I now have a newer version of Postgresql
available to me.  My original was 7.4 and my new is 8.0.3.

How can I get my data from this 7.4 data directory into my 8.0.3 fresh
install?

Thanks for any advice!

Chris


Re: Recovery after server crash

From
Martijn van Oosterhout
Date:
On Sun, Oct 23, 2005 at 12:31:33PM -0500, Chris wrote:
> Good afternoon, all:
>
> I recently experienced a server crash.  I have a backup of my Postgesql
> data directory.
>
> On rebuilding my machine, I decided to go with i386 instead of my
> original AMD64.  That means I now have a newer version of Postgresql
> available to me.  My original was 7.4 and my new is 8.0.3.
>
> How can I get my data from this 7.4 data directory into my 8.0.3 fresh
> install?

You can't. In general the raw data structures are not portable between
versions and *definitly* not portable between architechtures.

You need to install the original version, pg_dump the data and then
load that into your new version...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

Re: Recovery after server crash

From
ellis@no.spam ()
Date:
In article <1130088693.16135.2.camel@localhost>,
Chris <postgresql@cmulcahy.com> wrote:

>How can I get my data from this 7.4 data directory into my 8.0.3 fresh
>install?

Bring up a copy of 7.4 long enough to run pg_dumpall. Then load the
dump into 8.0.3.

--
http://www.spinics.net/yosemite/