Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdLNW-0003JC-0R for pgsql-general@arkaria.postgresql.org; Sat, 29 Dec 2018 20:38:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdLNU-00080C-87 for pgsql-general@arkaria.postgresql.org; Sat, 29 Dec 2018 20:38:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdLNS-000801-4X for pgsql-general@lists.postgresql.org; Sat, 29 Dec 2018 20:38:36 +0000 Received: from [66.111.4.25] (helo=out1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdLNM-0000t6-KS for pgsql-general@lists.postgresql.org; Sat, 29 Dec 2018 20:38:33 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EB7EA20E24 for ; Sat, 29 Dec 2018 15:38:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 29 Dec 2018 15:38:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=t H6fmzJxKSRa+p74DSzvnLew5vRLS96VuhHq7Q1QwPI=; b=nHdujTtlBbBGY7C84 XWKGRfMik3r7ZOETtOJMmj19rt8eIfGt+h19gDxGr3HqXvkrrvflL64QG1UEbe52 rYCev1gR+MjvEenWRwt1eqsT7+IiUbebnRlBVWOR2d5YWKx0kvyttciMtO6gJnrx ap9pveLHTLclduPKK5v9Jjb5u6rLQfQ9s/1xIsRHrsphWrSUaPI4R8CMmp5IxFvn gFXUWf1GgIrMVsvxBFlHOLHslyjA1rMc/w56VPnlVFVv48FQB76oOLoeJ6PBeZnD DQnRWLZFJnmrEyXCEfWzONWlFEjB5hGu7HNGnuFW+QYrBOfaO6LkoR9Nvj+UVlKm EgIkg== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=tH6fmzJxKSRa+p74DSzvnLew5vRLS96VuhHq7Q1Qw PI=; b=Rf/8J6s0hwmo2+89yoDa7shKjEYkj0RH3b5y+hYX29eMctffMyKKXuPc1 QzpmzcrHA+2JNXTO44F/XrU/GHniZ/2DPogfnC6bkK0v8Ctr4KWa3qau28oaeFse JlivmFTk11FW9mee11zae9ACn3ztF+uv4qYmWFFkgyqG3Fv58dgTwvocQiCs65Vj MvTgQYk0m3E77V+I2NvOgrrhWXBcCECQgdlGh+7mU1MfBMlx0n3IRQOEPJj2vsmh 0z6/xmSi72ml1MjV8I/hbZP5VjYPT7tEPKyXy51TFQFgI7yMpVNO1F8lb+h4hPwW sgg48QfHd+BDIULi1DIUY/NkJ8E5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrtdekgddugeduucdltddurdegtdekrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhht necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvg hsqhhlrdhorhhgnecukfhppeejuddrvdduvddrudefgedrfeenucfrrghrrghmpehmrghi lhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.2] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 3289FE4596 for ; Sat, 29 Dec 2018 15:38:06 -0500 (EST) Subject: Re: getting pg_basebackup to use remote destination To: pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <0245411e-2e67-7f52-7283-663d517005ab@aklaver.com> Date: Sat, 29 Dec 2018 12:38:04 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/29/18 11:04 AM, Chuck Martin wrote: > I thought I knew how to do this, but I apparently don't. I have to set > up a new server as a standby for a PG 11.1 server. The main server has a > lot more resources than the standby. What I want to do is run > pg_basebackup on the main server with the output going to the data > directory on the new server. But when I give this command: > > pg_basebackup -D "ssh root@10.0.1.16:/mnt/dbraid/data" -P -v -X s > > > it instead writes to my root drive which doesn't have the space, so it > fails and deletes the partial backup. > > > While I think I could figure out how to backup to a local directory then > rsync it to the new server, I'd like to avoid that due to the 750GB size. > > > Is there a way to tell pg_basebackup to use a remote destination for > output? Or do I have to run pg_basebackup on the standby server? Not that I know of. I would run it from the standby as a good deal of the heavy lifting is done on the main server anyway. In either case the standby will incur roughly the same load, namely receiving the data and writing it to disk. > > > And while I'm asking, has anyone yet written a guide/tutorial for PG 11 > replication? Everything I find online is very old. Maybe?: https://www.postgresql.org/docs/11/high-availability.html > > > Chuck Martin > Avondale Software -- Adrian Klaver adrian.klaver@aklaver.com