Monday, June 30, 2008

Re: [GENERAL] re-using cluster

Fernando Dominguez wrote:
> Hello,
>
> One of my hd failed recently, so I has to reinstall my system, but my data
> where on other hd that did
> not fail.
>
> So I want to use that data , I tried initd -D /storage/pgCluster but I get
> a "directory not empty" message, of course I
> want to use that cluster.
>
> How could I use that data?

First, take a copy of the cluster before doing anything else.

Then: if your new OS has the same version of PostgreSQL installed, and
is on the same architecture (ie both old and new are 32 bit) then you
should be able to simply start the postmaster with the old cluster using
pg_ctl then dump the database.

You don't need the same point release of PostgreSQL - for example, 8.2.7
can read a cluster created by 8.2.1, but 8.3.1 cannot read it.

If you now have a newer version of PostgreSQL you will need to compile
an older version to read your cluster, dump it, and then load it into
the new version of PostgreSQL.

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

No comments: