Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YqOeM-0007iT-IV for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 16:27:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YqOeM-0003rD-21 for pgsql-admin@arkaria.postgresql.org; Thu, 07 May 2015 16:27:50 +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 1YqOeK-0003no-Cu for pgsql-admin@postgresql.org; Thu, 07 May 2015 16:27:48 +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 1YqOeG-0007gz-2o for pgsql-admin@postgresql.org; Thu, 07 May 2015 16:27:45 +0000 Received: from [105.237.184.46] (helo=gs0.localdomain) by smtp.mtnbusiness.co.za with esmtps (Blowfish SMTP) (envelope-from ) id 1YqOe9-0007pt-GK for pgsql-admin@postgresql.org; Thu, 07 May 2015 18:27:37 +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 A5D06180060 for ; Thu, 7 May 2015 18:27:21 +0200 (SAST) Message-ID: <554B9261.9080305@geograph.co.za> Date: Thu, 07 May 2015 18:27:13 +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: pgsql-admin@postgresql.org Subject: connect postgresql to a different cluster Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-Spam-Report: BAYES_00=-1.9,RDNS_NONE=0.793, * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 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 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? So is there a way to move a cluster to another (same version) postgreql installation? Just for giggles I tried copying the /etc/postgresql/9.4/main folder to /etc/postgresql/9.4/gisdata and hacking the contents therein, but that never worked. Googling around and reading installation guides only comes up with creating new clusters. I doubt if setting the PGDATA variable (where is that set???) will help as the /etc/postgresql/9.4/gisdata is missing. A thought is to change the name of this cluster to xxx, create the cluster again, delete it and mv xxx back to this name. But maybe there is an elegant way to "import" a cluster? TIA, Zoltan -- =========================================== 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 =========================================== -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin