Re: connect postgresql to a different cluster

From: "Gilberto Castillo" <gilberto(dot)castillo(at)etecsa(dot)cu>
To: "Zoltan Szecsei" <zoltans(at)geograph(dot)co(dot)za>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: connect postgresql to a different cluster
Date: 2015-05-07 18:02:53
Message-ID: 58149.192.168.207.54.1431021773.squirrel@webmail.etecsa.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>
> Hi,
> My question refers to a newly installed postgresql 9.4 on ubuntu 15.04.
>
> Is it possible to mount a file system with an existing 9.4 version
> postgresql cluster onto a new machine and get a fresh postgresql install
> to connect to that cluster?
>
> When I installed postgresql it created a /var/lib/postgrersql/9.4/main
> cluster, and pointed to it via /etc/postgresql/9.4/main
>
> I then mounted a HD with an existing v9.4 postgresql cluster called
> gisdata at /mnt/geo_pgsql/postgres.
> Note that I have no /etc/postgresql/9.4/gisdata directory. (I forgot to
> back it up before reinstalling ubuntu)
>
> initdb -D /mnt/geo_pgsql/postgres will clobber my existing gisdata
> cluster, will it not?

Use:
pg_ctl -D /mnt/geo_pgsql/postgres -l /tmp/logfile start

Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba

Attachment Content-Type Size
unknown_filename text/plain 179 bytes

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message phuongnh2 2015-05-08 04:41:46 Re: Issue import (COPY) data by between miss lines
Previous Message Zoltan Szecsei 2015-05-07 17:32:37 Re: connect postgresql to a different cluster