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 1eno8P-0002ic-RM for pgsql-general@arkaria.postgresql.org; Mon, 19 Feb 2018 16:17:45 +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 1eno8P-0008ES-0J for pgsql-general@arkaria.postgresql.org; Mon, 19 Feb 2018 16:17:45 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eno8O-0008EJ-PB for pgsql-general@lists.postgresql.org; Mon, 19 Feb 2018 16:17:44 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eno8H-000223-1R for pgsql-general@lists.postgresql.org; Mon, 19 Feb 2018 16:17:44 +0000 Received: from Davids-iMac.local (unknown [173.169.74.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 8F5C65466C; Mon, 19 Feb 2018 16:17:34 +0000 (UTC) Subject: Re: pgBackRest backup from standby To: Don Seiler Cc: pgsql-general@lists.postgresql.org References: <3f5aa386-32df-4ea9-51a6-ae0c918fd04f@pgmasters.net> <4ae14a90-1f2d-09f6-5e56-1609acad51b0@pgmasters.net> From: David Steele Message-ID: <09b97a16-d7c4-e014-4e69-aa8b890cb6cc@pgmasters.net> Date: Mon, 19 Feb 2018 11:17:33 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 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/19/18 10:32 AM, Don Seiler wrote: > On Mon, Feb 19, 2018 at 9:21 AM, David Steele > wrote: > > > Yes, they are typically very small.  The general exception to this rule > is if logs are stored in pg_log.  I recommend storing logs out of the > PGDATA dir as they can be quite large and don't really make sense to > restore to another server. > > Files copied from the master will be marked as such in backup.manifest > (master:true) so you can check for yourself. > > > Good to know. And fortunately for this DB we do have pg_log (and > pg_xlog) symlinked to different volumes outside of $PGDATA. If pg_log is symlinked to PGDATA it will be copied. pg_xlog is not copied in any backup. > > > I did come up with a sort of Rube Goldberg-esque workaround for now > > involving using a clone of the prod standby VM from Veeam backup to use > > as the backup source (after stopping recovery and opening it as a > > standalone DB). > > You don't get PITR that way, of course, but at least it's a backup.  As > long as your clone is consistent. > > > Yes it's a crash-consistent snapshot-based backup. I've done quite a few > restores from it and it works great. It can do PITR as well since I > would have all the WAL files from prod needed to keep recovering. But > for these cases I just recover it to the first consistent point and open > it for testing (or backups in this case).  I don't think it would be safe to do PITR on a backup taken in this way. The WAL diverges even if you suppress a timeline switch. -- -David david@pgmasters.net