pg_probackup icon indicating copy to clipboard operation
pg_probackup copied to clipboard

How to see last possible backup (restore) time of wal archive

Open yennor opened this issue 3 years ago • 5 comments

I want to find out when the last successfull wal archive backup was made (being pushed by archive-push from db server), and what the last (newest) possible restore time would be. To centrally control that backups are being made correctly. pg_probackup-11 show -B /var/lib/pg-probackup-11/ --archive Doesn't seem to show that, neither does pg_probackup-11 show -B /var/lib/pg-probackup-11/ This one only shows the timestamp of when the full/incremental/page backup was made.

I could just verify the date of the last .wal archive in the wal directory (and hope it was copied completely, and all the previous one were also copied completely). But it would be easier if one of the commands would return that. So I can send warning messages in case there wasn't a successful wal archive backup in x hours/days/... .

Also it would make it easier to manually control when the last wal file was copied.

yennor avatar Jan 26 '22 14:01 yennor

Yes, it's very helpful. I always wanted to know that I have all the WALs in place and there are no gaps in them.

sgrinko avatar Jun 16 '22 07:06 sgrinko

Hello! It is possible to do, but to be done correctly, we would need to parse WAL when doing archive-push. We will think about it.

gsmolk avatar Jun 18 '22 15:06 gsmolk

hi again, did you think about it? ;-)

yennor avatar Mar 21 '23 16:03 yennor

Hi, To be honest - we didn't :-( However we now have another use case for parsing WALs during archive-push, so we will include this.

fukanchik avatar Mar 21 '23 16:03 fukanchik

Cool. That gives a chance to properly monitor the backups :-).

yennor avatar Mar 21 '23 19:03 yennor