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 1iAAHs-00060Q-Mp for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2019 10:00:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iAAHr-0004Ie-Jw for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2019 10:00:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAAHr-0004IR-6h for pgsql-general@lists.postgresql.org; Tue, 17 Sep 2019 10:00:43 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iAAHk-0004ES-V0 for pgsql-general@postgresql.org; Tue, 17 Sep 2019 10:00:42 +0000 Received: by mail-oi1-x243.google.com with SMTP id t84so2285560oih.10 for ; Tue, 17 Sep 2019 03:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/d3oRxx8GH7+ZY0akh3cwc4vww2BYMdC+gIcF2V3oFA=; b=AI2stndzuCg4pdCSQcME0rbAioHdz6wW8JPF0txKBR15S/eMnX5T6eVoJZoziZaOGu jQ1UuWfCtbgYSlaJW1qSC8y6hZefAcjFpCWN/lGXAuWUTt8z2lgh/yQc6SNRCNRQ13qR MA8MVmeoAGXpi96pt/0Dcq1UnkSCSDB0cJctE4iOD7wfJ/izighFDwgto5rJ8X2M/U1k pemGWRuc463ydq5RyztALGjJcfiug14VnHar2E6XHNQYxXrSd1brVj0jUPTxakBhdQjs NQWTR4PfCS01rnU/On25/I+5ToT8UJvEvThH4FVXH4yRxFIeRcc63XXPy0Qdc/ctyVeW BSfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/d3oRxx8GH7+ZY0akh3cwc4vww2BYMdC+gIcF2V3oFA=; b=hO3y9GulIV8mrSFbKdczZav/1DkeaJgZ1QmGTGsXW5xP7akUgzy5M6Dd76kMLWHUdO YL9aT0/Vj9LX9PwPrEfqSFHX9XlRs+MHFgLVSrI25sjkCwAktgGS63CeRNqHS6W1vOYf ji7ynuCHSTD4oPt5W6yLNP587gNHaPROoVF82MmmHTnhTF3kBecjlFrYZRW9vRyQ2wXW HT3u+/n8xxrfoHIRkfYc4+OXj9sE52ZVTqKGt5kPUhuiarwn0ONgivcAbfJarqliU06J j3pGag6ltIGV+RORfQ4xX5avjvjQFyOOQJPJpVGaVpGwVu4+9iPvg28tbMSTJtNZLSIy YD2A== X-Gm-Message-State: APjAAAWZ/9ojRyUZTbN1mawZ/y2G6h5TqbfsG3T1WrtSxJ+96Tye338u eiPJwJKIgv6d/YxLeRQvjNH2W6ly+q4Hcw== X-Google-Smtp-Source: APXvYqyMHGLUPC/+mO9FTiZj9q2V1rHb5PQyHZSTWIGb8iB3J04DcLiD94sPJwqc2BOnM1z8OIUZ2Q== X-Received: by 2002:a05:6808:302:: with SMTP id i2mr916482oie.176.1568714436157; Tue, 17 Sep 2019 03:00:36 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id d1sm548684ote.79.2019.09.17.03.00.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Sep 2019 03:00:35 -0700 (PDT) Subject: Re: pgbackrest restore to new location? To: Forums postgresql References: <1896f86b-d77f-3ea6-b304-0cb8912cab79@gmail.com> From: Ron Message-ID: <09baf146-9f0e-96d8-9ccf-afbe810f179f@gmail.com> Date: Tue, 17 Sep 2019 05:00:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/17/19 4:29 AM, Luca Ferrari wrote: > On Tue, Sep 17, 2019 at 3:09 AM Ron wrote: >> Hi, >> >> In order to do this, do I create a new stanza in config file which has >> pg1-path point to the new/empty directory structure while still pointing to >> the existing backup directory, and restore that stanza? > No, I would do this: > 1) execute stop for that stanza on the backup machine > 2) change the pg1-path for that stanza on the target machine > 3) execute the restore command on the target machine > 4) adjust backup machine stanza path and 'start' it again. > > If you create a new stanza, pgbackrest will not find it in the backup > repository. Thanks, Luca.  I realized that mistake when trying the restore. The real problem is that after doing that, "pg_ctl start -D /path/to/new/data" fails with "PANIC: could not locate a valid checkpoint record". -- Angular momentum makes the world go 'round.