Re: a question about Point-in-Time Recovery (PITR) - Mailing list pgsql-admin

From Ron
Subject Re: a question about Point-in-Time Recovery (PITR)
Date
Msg-id 0834f1ba-c66f-5c5a-c55a-f02fde5e20c7@gmail.com
Whole thread Raw
In response to a question about Point-in-Time Recovery (PITR)  (jian xu <jamesxu@outlook.com>)
List pgsql-admin
On 8/11/22 17:15, jian xu wrote:
@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:DengXian; panose-1:2 1 6 0 3 1 1 1 1 1;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:"\@DengXian"; panose-1:2 1 6 0 3 1 1 1 1 1;}p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:11.0pt; font-family:"Calibri",sans-serif;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; font-size:11.0pt; font-family:"Calibri",sans-serif;}.MsoChpDefault {mso-style-type:export-only;}div.WordSection1 {page:WordSection1;}ol {margin-bottom:0in;}ul {margin-bottom:0in;}

Hello,

         I am creating an automation script which can do PITR restore. For example if users specify the timestamp, I can retore the db to that point. All backup files are on other place, the restore procedure includes

  1. Download full backup file generated from pg_basebackup
  2. Download all wal archive files generated since the full backup file to the timestamp users specified.

However, the problem is how I can read the begin and end transaction timestamp in each wal archive file?

Without knowing the transaction timestamp, I am not able know which wal archive file I need to download.

I tried pg_waldump, but it doesn’t have transaction timestamp.

Does anyone know the solution? Thanks!


If you run Linux, then pgBackRest is (almost certainly) what you want. 

Download it from https://pgbackrest.org/ or get it from your distro's https://www.postgresql.org/download/ repository.

--
Angular momentum makes the world go 'round.

pgsql-admin by date:

Previous
From: jian xu
Date:
Subject: a question about Point-in-Time Recovery (PITR)
Next
From: Stuart Watson
Date:
Subject: logical replication help