Re: Restore/dump from "/usr/local/pgsql/data" directory

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: kongsgar(at)stud(dot)ntnu(dot)no
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Restore/dump from "/usr/local/pgsql/data" directory
Date: 2010-09-24 11:30:31
Message-ID: 4C9C8BD7.5020302@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24/09/2010 3:24 PM, kongsgar(at)stud(dot)ntnu(dot)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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Polyakov Vladimir 2010-09-24 11:51:37 Libpq memory leak
Previous Message Allan Kamau 2010-09-24 07:35:02 Favourable index type for varbit field