pgstef / check_pgbackrest

pgBackRest backup check plugin for Nagios
PostgreSQL License
36 stars 14 forks source link

Option for check of minimum age of oldest full backup #28

Closed gnullme closed 2 years ago

gnullme commented 2 years ago

It would be nice to have an option similar to --retention-age-to-full for defining the minimum age of the oldest full backup.

This way one could check that a required time period for PITR is met.

Example: One full backup is created every week and the retention in pgBackRest is set to 4 weeks. Currently I can only set a limit for the age of the newest full backup. If I want to make sure, that at least 4 weeks of PITR are covered, I also need to check that the oldest full backup is at least 4 weeks old.

pgstef commented 2 years ago

Hi,

Sorry about the late answer.

The retention service has first been created to make sure pgBR expires enough old backups but the option you suggest also seems interesting.

I've added it in 69a2edf. Feel free to try it to make sure it match your expectation before the next release.

Have a good day, Kind Regards, Stefan

gnullme commented 2 years ago

Hi,

thanks for the quick implementation :)

I tried it and it works exactly as i expected.

Kind Regards, Hendrik

pgstef commented 2 years ago

Hi,

Closing this issue since this feature has been released in version 2.2.

Kind Regards