From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: a question about Point-in-Time Recovery (PITR)
Date: Fri, 12 Aug 2022 00:08:20 -0500
Message-ID: <0834f1ba-c66f-5c5a-c55a-f02fde5e20c7@gmail.com> (raw)
In-Reply-To: <BL0PR02MB4561D19C498EDD1CF62962A0A1649@BL0PR02MB4561.namprd02.prod.outlook.com>
References: <BL0PR02MB4561D19C498EDD1CF62962A0A1649@BL0PR02MB4561.namprd02.prod.outlook.com>
On 8/11/22 17:15, jian xu wrote:
>
> 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.
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: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: a question about Point-in-Time Recovery (PITR)
In-Reply-To: <0834f1ba-c66f-5c5a-c55a-f02fde5e20c7@gmail.com>
* 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