pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rui DeSousa <rui@crazybean.net>
To: Licio Matos <licio.matos@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Backup From HotStandby
Date: Wed, 28 Aug 2019 16:09:57 -0400
Message-ID: <1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net> (raw)
In-Reply-To: <CAK6Tc4MPUUTK1y0pjW=ON2R6Y-O+ch+T5G_pkb6p4vFxSCFV9A@mail.gmail.com>
References: <CAK6Tc4OFMQA9Nb7rh2bnQkUyHjO=oAThWFGWTP0P-c9+jzAWXQ@mail.gmail.com>
	<CAMkU=1yOQ=9sGktkodafbsS_V0Fdtmxio_NkoGXnnnOXbWh8GQ@mail.gmail.com>
	<CAK6Tc4P+pKCeu31RZe-Exi9KC=mLVX6DSdGe6v+zCikjdcCv=g@mail.gmail.com>
	<61A32609-4552-4F4D-9B88-EF15C06010C1@crazybean.net>
	<CAK6Tc4MPUUTK1y0pjW=ON2R6Y-O+ch+T5G_pkb6p4vFxSCFV9A@mail.gmail.com>



> On Aug 28, 2019, at 3:31 PM, Licio Matos <licio.matos@gmail.com> wrote:
> 
> I have been using a lvm snapshot, all the database files are on the same disk. 

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.    


> 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… are you running that on the replica? It should fail; unless you’re running it on the primary. 

I wouldn’t 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.




view thread (10+ messages)  latest in thread

Message-ID: <1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net>
Permalink:  ../1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net/
Also on:    postgresql.org/message-id/1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: rui@crazybean.net, licio.matos@gmail.com, jeff.janes@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Backup From HotStandby
  In-Reply-To: <1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox