pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeda question about Point-in-Time Recovery (PITR)
2+ messages / 2 participants
[nested] [flat]
* a question about Point-in-Time Recovery (PITR)
@ 2022-08-11 22:15 jian xu <jamesxu@outlook.com>
0 siblings, 1 reply; 2+ messages in thread
From: jian xu @ 2022-08-11 22:15 UTC (permalink / raw)
To: pgsql-admin
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!
James
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: a question about Point-in-Time Recovery (PITR)
@ 2022-08-12 05:08 Ron <ronljohnsonjr@gmail.com>
parent: jian xu <jamesxu@outlook.com>
0 siblings, 0 replies; 2+ messages in thread
From: Ron @ 2022-08-12 05:08 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-08-12 05:08 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 22:15 a question about Point-in-Time Recovery (PITR) jian xu <jamesxu@outlook.com>
2022-08-12 05:08 ` Ron <ronljohnsonjr@gmail.com>
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