Re: re-using cluster

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Fernando Dominguez <ghotam88(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: re-using cluster
Date: 2008-06-30 07:00:12
Message-ID: 4868847C.40403@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2008-06-30 08:58:32 Re: freebsd + postgresql 8.3.3 = 100% of cpu usage on stats collector?
Previous Message Fernando Dominguez 2008-06-30 06:55:15 re-using cluster