Re: Restore/dump from "/usr/local/pgsql/data" directory - Mailing list pgsql-general

From Craig Ringer
Subject Re: Restore/dump from "/usr/local/pgsql/data" directory
Date
Msg-id 4C9C8BD7.5020302@postnewspapers.com.au
Whole thread Raw
In response to Re: Restore/dump from "/usr/local/pgsql/data" directory  (kongsgar@stud.ntnu.no)
List pgsql-general
On 24/09/2010 3:24 PM, kongsgar@stud.ntnu.no wrote:
> To specify: I have a copy of the data in "/usr/local/pgsql/data" from my
> old, but I don't have access to the old system anymore so I cannot
> simply do a "pg_dumpall" from there.
>
> I believe I could copy the content of "/usr/local/pgsql/data" into
> "/usr/local/pgsql/data" on my new system.

Maybe. You'd need to make sure that the target /usr/local/pgsql/data was
*empty*, and that you were running the same major version (ie both 8.4
or both 8.3, etc) of PostgreSQL on both the old and new servers. Both
servers need to be the same architecture, ie both must be ix86 (32-bit
x86) or both must be x64 (64-bit intel/amd), etc.

Personally, I'd try to start up postgresql with the old data directory
as a target, and get it running to the point where you can do a
pg_dumpall. Then initdb a proper new cluster and restore to it.

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

pgsql-general by date:

Previous
From: Allan Kamau
Date:
Subject: Favourable index type for varbit field
Next
From: kongsgar@stud.ntnu.no
Date:
Subject: Re: Restore/dump from "/usr/local/pgsql/data" directory