Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ehicD-0007Wh-Ea for pgsql-admin@arkaria.postgresql.org; Fri, 02 Feb 2018 21:11:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehicB-0000eu-K6 for pgsql-admin@arkaria.postgresql.org; Fri, 02 Feb 2018 21:11:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ehicB-0000ec-06 for pgsql-admin@lists.postgresql.org; Fri, 02 Feb 2018 21:11:19 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ehic7-0007nB-Ac for pgsql-admin@lists.postgresql.org; Fri, 02 Feb 2018 21:11:17 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 19132225E6; Fri, 2 Feb 2018 16:11:14 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 02 Feb 2018 16:11:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=8T/M4D glIYh36SU2tqrKJ29w4MFlVsffh9HK1bs2RAk=; b=WbQDj0R7ALdvMkK9WGSioa 1mqAFsPpomyYwq0lwcxjoSh3Y3wWeTiHckzSPk5FdLwLL9onZCLZ+ttzGeLxGueT N7qfDtHmSF96hot+uwPN72gbXSI3O46iPDaVjUXSeuhOiEtY02s+aZpvdDYsbghN 3ulOCvzXInEuZU3wxDTL7r+Pu7U/8WkqCqavpReezxz6wzeBb6Gj01vNAdarZqYi jp7iMYUDe/ShoMLZ2crXQ8ICuASCScEUVPDOhf8evIulzSweGhtGIxnV+y7LabhL LAE4f4iWAG8zuBW+QijIop2CTu6SwXUDux7HNZErrGelrsBBaPxOXeBmu/Aw5uAA == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id C02A7249A3; Fri, 2 Feb 2018 16:11:13 -0500 (EST) Subject: Re: pg_basebackup with a twist? To: Ray Stell , pgsql-admin@lists.postgresql.org References: From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Fri, 2 Feb 2018 16:11:12 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/2/18 14:40, Ray Stell wrote: > I have a fairly busy primary that I put a symlink in to move pg_xlog > over to another I/O subsystem.   I was going to build a standby with > pg_basebackup running the command from the standby host.  I thought > maybe I could put the symlink in on the new standby, but no go:  > "pg_basebackup: directory "/database/test.basebackup/" exists but is not > empty" as documented.  Is the only way to do this to "fix" it up after > the restore?   I want to use the "-x" option in order to get the WAL > during the backup.  Just curious, my guess is I'll have to build the > stby from a intermediate file.  TIA. pg_basebackup has a --waldir or --xlogdir (depending on version) option for this, analogous to initdb. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services