Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UxNsv-00060U-VD for pgsql-admin@arkaria.postgresql.org; Thu, 11 Jul 2013 20:54:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UxNsv-0005Hk-4H for pgsql-admin@arkaria.postgresql.org; Thu, 11 Jul 2013 20:54:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UxNsu-0005Hd-A4 for pgsql-admin@postgresql.org; Thu, 11 Jul 2013 20:54:40 +0000 Received: from qmta14.westchester.pa.mail.comcast.net ([2001:558:fe14:44:76:96:59:212]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UxNsp-0001WS-5k for pgsql-admin@postgresql.org; Thu, 11 Jul 2013 20:54:39 +0000 Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72]) by qmta14.westchester.pa.mail.comcast.net with comcast id z76F1l0011ZXKqc5E8uY5Z; Thu, 11 Jul 2013 20:54:32 +0000 Received: from homie ([38.98.177.132]) by omta21.westchester.pa.mail.comcast.net with comcast id z8uK1l01d2rmZlA3h8uNR9; Thu, 11 Jul 2013 20:54:30 +0000 Received: by homie (Postfix, from userid 1000) id 691CC180832; Thu, 11 Jul 2013 16:54:19 -0400 (EDT) To: Wells Oliver Cc: gilberto.castillo@etecsa.cu, pgsql-admin@postgresql.org Subject: Re: Creating new cluster by copying directory? References: <53809.192.168.207.54.1373575311.squirrel@webmail.etecsa.cu> From: Jerry Sievers Date: Thu, 11 Jul 2013 15:54:19 -0500 In-Reply-To: (Wells Oliver's message of "Thu\, 11 Jul 2013 13\:42\:01 -0700") Message-ID: <87zjts6cn8.fsf@comcast.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1373576072; bh=AoELI4WYTtZIWE3V0KsMHh4yP+nykuilg1UAXN5dG3Y=; h=Received:Received:Received:To:Subject:From:Date:Message-ID: MIME-Version:Content-Type; b=ATZmitc+ll20PWl4tl2QOULO/ZALqSvogoE7KayrBhuztYUxGBsA6KEmtDbnCvCUl /VcQiJ/KHquz8vH3eSdG66JGoCFq1JXahAKAnngIAw9sHbLCi+i3BKOHUCtBHLtLxb qJZIO9ILUveki4XGSp54wFAA8O6WzFx9yVOCL767BCos5bmerUxi4aCyr+7fCtQfux YJipoMiH93zAFhPB7ToGYXPbdnzq+UrT1ZyUC8zZEkMgRJAGcvxl6nqBAaY0TXGU35 FYP1DvsFY8LCtiwND2w0sbOtIphYLdI+QvAxRq5PSqJelmNeQM1o9I+ltt2ZAWiiAN 3WGJApLvbruhw== X-Pg-Spam-Score: -1.1 (-) 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 Wells Oliver writes: > So it's safe to copy the files in /var/lib/postgresql/9.1/main to /var/lib/postgresql/9.1/test while main is running? Yes, provided that you put main in backup mode and then do a PITR when you bring up this new test instance. If your main DB is running but absolutely idle, you might get away just starting it in which case the postmaster will do a regular crash recovery but I'll presume your source instance 'main' isn't idle. Study the manual sections relating to backup/PITR. HTH > On Thu, Jul 11, 2013 at 1:41 PM, Gilberto Castillo wrote: > > > All: it would take ~4 hours to pg_restore a backup. I want to quickly > > create a duplicate cluster (for testing). My idea: > > > > 1. pg_ctlcreatecluster 9.1 test > > 2. rm /var/lib/postgresql/9.1/test/* > > 2. cp /var/lib/postgresql/9.1/main /var/lib/postgresql/9.1/test > > 3. pg_ctlcluster 9.1 test start > > > > Is this viable? If not, is there another way to create a duplicate cluster > > in a timely fashion? > > Test Repmgr works with the same philosophy. ;-) > > Saludos, > Gilberto Castillo > 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: , > > -- > Wells Oliver > wellsoliver@gmail.com > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin