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 1i34GZ-0000xu-7N for pgsql-admin@arkaria.postgresql.org; Wed, 28 Aug 2019 20:10:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i34GY-0003W8-5c for pgsql-admin@arkaria.postgresql.org; Wed, 28 Aug 2019 20:10:02 +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 1i34GX-0003US-Np for pgsql-admin@lists.postgresql.org; Wed, 28 Aug 2019 20:10:01 +0000 Received: from impout008aa.msg.chrl.nc.charter.net ([47.43.20.32] helo=impout008.msg.chrl.nc.charter.net) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1i34GV-0004Ny-H2 for pgsql-admin@lists.postgresql.org; Wed, 28 Aug 2019 20:10:00 +0000 Received: from cerberus.crazybean.net ([24.151.10.150]) by cmsmtp with ESMTP id 34GUiKRVrMMJt34GUibhvI; Wed, 28 Aug 2019 20:09:59 +0000 Authentication-Results: crazybean.net; none X-Authority-Analysis: v=2.3 cv=QtjqIm6d c=1 sm=1 tr=0 a=D2HTw/M6/8MmcHighGO7rg==:117 a=D2HTw/M6/8MmcHighGO7rg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=xqWC_Br6kY4A:10 a=FmdZ9Uzk2mMA:10 a=pGLkceISAAAA:8 a=FcExP7w4bR7zduO26AcA:9 a=rBJbvDXywLPBUyqf:21 a=5tcLe3dueshdUYMJ:21 a=QEXdDO2ut3YA:10 Received: from [IPv6:2001:470:e117:4:f1b1:7ed9:a416:c22e] (2001:470:e117:4:f1b1:7ed9:a416:c22e [IPv6:2001:470:e117:4:f1b1:7ed9:a416:c22e]) by cerberus.crazybean.net (OpenSMTPD) with ESMTPSA id 4e3491bc (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 28 Aug 2019 16:09:58 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Backup From HotStandby From: Rui DeSousa In-Reply-To: Date: Wed, 28 Aug 2019 16:09:57 -0400 Cc: Jeff Janes , pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net> References: <61A32609-4552-4F4D-9B88-EF15C06010C1@crazybean.net> To: Licio Matos X-Mailer: Apple Mail (2.3445.104.11) X-CMAE-Envelope: MS4wfAx+sMjBHStVjvqaboK4L9TcADhoBwfuHu9PNRQRu1JfcfUZdp+/t3VfRSBf8vq0jVhaprGalj80d6903nDy07cdoXj+vkjl/8TpKZFSIf3GdwYJOXGg xLo4ABvCTrFeNS4YotJrTs1fNubcC06520f8yy20FGa8Bbfod0EQigru7YNaQuEi1c+NVoUmOJVSNvb8VUr+itmJBfj4O59P9roySxHrPxXQGGjtYBz03ac+ GmjDBcDXecJih1KULGyItQ7elu5XjSkoNkHS/dg3/PM= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Aug 28, 2019, at 3:31 PM, Licio Matos = wrote: >=20 > I have been using a lvm snapshot, all the database files are on the = same disk.=20 Sounds good; note that the filesystem will also need recovery thus you = may want to consider trying to quiesce the filesystem before creating = the snapshot to avoid filesystem issues. =20 > My script start the pg_start_backup() make a lvm snapshot stop the = backup and then copy the files do another filesystem from the snap and = after to the tape. Hmm=E2=80=A6 are you running that on the replica? It should fail; unless = you=E2=80=99re running it on the primary.=20 I wouldn=E2=80=99t bother with pg_start_backup() to take a snapshot = backup on the replica. When recovering, the database will first do its = crash recovery and then apply any WAL files needed to reach your = recovery target time.=