Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YqPfl-0002gi-Ro for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 17:33:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YqPfk-0007rF-E5 for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 17:33:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YqPfi-0007r6-2L for pgsql-admin@postgresql.org; Thu, 07 May 2015 17:33:18 +0000 Received: from smtp02-smtpout02.rb.za.mtnbusiness.net ([41.181.159.170]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YqPfd-0000Tj-OF for pgsql-admin@postgresql.org; Thu, 07 May 2015 17:33:16 +0000 Received: from [105.237.184.46] (helo=gs0.localdomain) by smtp.mtnbusiness.co.za with esmtps (Blowfish SMTP) (envelope-from ) id 1YqPfV-000Erw-KB; Thu, 07 May 2015 19:33:09 +0200 Received: from [192.168.0.140] (zolpc.geograph.co.za [192.168.0.140]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: zoltans.geograph.co.za) by gs0.localdomain (Postfix) with ESMTPSA id 1D17D180060; Thu, 7 May 2015 19:32:45 +0200 (SAST) Message-ID: <554BA1B5.6090803@geograph.co.za> Date: Thu, 07 May 2015 19:32:37 +0200 From: Zoltan Szecsei User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: gilberto.castillo@etecsa.cu CC: pgsql-admin@postgresql.org Subject: Re: connect postgresql to a different cluster References: <554B9261.9080305@geograph.co.za> <58149.192.168.207.54.1431021773.squirrel@webmail.etecsa.cu> In-Reply-To: <58149.192.168.207.54.1431021773.squirrel@webmail.etecsa.cu> Content-Type: multipart/alternative; boundary="------------070109040709020301050800" X-Spam-Score: -1.1 (-) X-Spam-Report: BAYES_00=-1.9,HTML_MESSAGE=0.001,RDNS_NONE=0.793, * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------070109040709020301050800 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Thanks to David and Gilberto for the input. All sorted and working. Kind regards, Zoltan On 2015/05/07 20:02, Gilberto Castillo wrote: > >> 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 > > > --- > This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu > Visit our web-site: , -- =========================================== Zoltan Szecsei PrGISc [PGP0031] Geograph (Pty) Ltd. GIS and Photogrammetric Services P.O. Box 7, Muizenberg 7950, South Africa. Mobile: +27-83-6004028 Fax: +27-86-6115323 www.geograph.co.za =========================================== --------------070109040709020301050800 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Hi,
Thanks to David and Gilberto for the input.

All sorted and working.

Kind regards,
Zoltan


On 2015/05/07 20:02, Gilberto Castillo wrote:

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


--- 
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: <http://www.kaspersky.com>, <http://www.viruslist.com>


-- 

===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services

P.O. Box 7, Muizenberg 7950, South Africa.

Mobile: +27-83-6004028
Fax:    +27-86-6115323     www.geograph.co.za
===========================================
--------------070109040709020301050800--