CHECK_PGBACKREST(1)
π NAME π
check_pgbackrest β the pgBackRest backup check plugin for Nagios, bestie. Yes, it's really out here monitoring your backups so you don't have to lie awake at 3am wondering. π«Ά
β¨ SYNOPSIS β¨
check_pgbackrest [-s|--service SERVICE] [-S|--stanza NAME]
check_pgbackrest [-l|--list]
check_pgbackrest [--help]
πΈ DESCRIPTION πΈ
okay so check_pgbackrest is literally built to monitor pgBackRest (2.52 and above) backups from Nagios. like, that's the whole job. it's giving "responsible adult who actually checks their backups". π
-s,--serviceSERVICE β the Nagios service to run. peek at the SERVICES section below for what each one does, or just use--listfor a short little service + description list. super convenient, no cap.-S,--stanzaNAME β name of the stanza to check. that's the stanza, bestie, not your fave playlist.--repoREPOSITORY β the repository index to operate on. if you don't pass a--repoargument, the service will operate on all repositories defined, checking for inconsistencies across multiple repositories. and when you're using multiple repositories, it's recommended to also define checks using the--repoargument to verify the sanity of each repository separately. one repo at a time = vibe check per repo, iykyk.-O,--outputOUTPUT_FORMAT β the output format, bestie. supported outputs are:human,json,nagios(default),nagios_strictandprtg.
the nagios_strict output format will filter out unsupported types of values from the performance data. it's the "no extras, just the facts" of output formats. π
-C,--commandFILE β pgBackRest executable file (default:pgbackrest). literally which binary to poke.-c,--configCONFIGURATION_FILE β pgBackRest configuration file. yes, the whole config, slay.-P,--prefixCOMMAND β some prefix command to execute the pgBackRest info command (eg:sudo -iu postgres). the little "excuse me, run this as someone else" garnish. π-l,--listβ list available services. short king of a flag, tells you everything available.--debugβ print some debug messages. chaos mode: on, but useful.-V,--versionβ print version and exit. bye bestie π-?,--helpβ show this help page.
π¦ SERVICES π¦
descriptions and parameters of available services. buckle up, this is the main character section.
retention
- Fail when the number of full backups is less than the
--retention-fullargument. πΈ - Fail when the number of differential backups is less than the
--retention-diffargument. - Fail when the number of incremental backups is less than the
--retention-incrargument. - Fail when the newest backup is older than the
--retention-ageargument. - Fail when the newest full backup is older than the
--retention-age-to-fullargument. - Fail when the oldest backup is newer than the
--retention-age-to-oldestargument.
The following units are accepted (not case sensitive): s (second), m (minute), h (hour), d (day). You can use more than one unit per given value. so like, mix and match, it's very chill.
Arguments are not mandatory to only show some information. so if you just wanna see stuff and not get yelled at, that's allowed. π
archives
Check if all archived WALs exist between the oldest and the latest WAL needed for the recovery. the "did we lose any WAL" detective service. π
Use the --wal-segsize argument to set the WAL segment size.
The following units are accepted (not case sensitive): b (Byte), k (KB), m (MB), g (GB), t (TB), p (PB), e (EB) or Z (ZB). Only integers are accepted. Eg. 1.5MB will be refused, use 1500kB. no decimals, she does not do decimals. π
The factor between units is 1024 bytes. Eg. 1g = 1G = 1024*1024*1024.
Use the --ignore-archived-before argument to ignore the archived WALs generated before the provided interval. Used to only check the latest archives. it's giving "we don't care about the old stuff rn".
Use the --ignore-archived-after argument to ignore the archived WALs generated after the provided interval.
The --latest-archive-age-alert argument defines the max age of the latest archived WAL as an interval before raising a critical alert. β οΈ
The following units are accepted as interval (not case sensitive): s (second), m (minute), h (hour), d (day). You can use more than one unit per given value. If not set, the last unit is in seconds. Eg. 1h 55m 6 = 1h55m6s. so cute that it just assumes seconds at the end.
All the missing archives are only shown in the --debug mode. so if you want the tea, you need --debug.
Use --list-archives in addition with --debug to print the list of all the archived WAL segments.
Use --list-boundaries in addition with --debug to print the list of all the boundary WAL segments fetched from the history files. yes, plural flags, plural fun. β¨
By default, all the archives older than the oldest backup start archive or newer than max_wal returned by the pgBackRest info command are ignored. default behaviour my beloved.
Use the --extended-check argument to force a full check of the found archives and raise warnings in case of inconsistencies. π₯
When WAL archives on different timelines are found, .history files are parsed to find the switch point and define the boundary WAL. timeline girlies rise.
Use the --max-archives-check-number to prevent infinite WAL archives check when boundary WAL can't be defined properly. > this one is genuinely important bestie β without it you can get stuck in an endless check loop, and nobody has time for that. π«Ά
In case of pgBackRest db history change (after a successful stanza-upgrade), only the latest db system/version will be checked.
check_pgb_version
Check if this script is running a given version.
You must provide the expected version using --target-version. mandatory, no skipping. π
pgbackrest_version
Check if pgBackRest is running a given version.
You must provide the expected version using --target-version. same energy, different target.
π CONTRIBUTING π
check_pgbackrest is an open project. Any contribution to improve it is welcome. come thru, we love a collaborator. π
β VERSION β
check_pgbackrest version 2.4, released on Fri Jul 05 2024. iconic behaviour, honestly.
π LICENSING π
This program is open source, licensed under the PostgreSQL license. For license terms, see the LICENSE file. free and legal, we love to see it.
π AUTHORS π
- Author: Stefan Fercot. π«Ά
- Logo: Damien Cazeils (www.damiencazeils.com).
- Copyright: (c) 2018-2020, Dalibo / 2020-2024, Stefan Fercot.
and that's the whole page bestie β this was check_pgbackrest version 2.4 from the 2026-01-14 era of the CHECK_PGBACKREST(1) manual. now go check your backups, you gorgeous responsible sysadmin. periodt. π
π¦β¨
π¦ where this page comes from
- ubuntu resolute: check-pgbackrest 2.4-1build1 Β· PostgreSQL
- ubuntu stonking: check-pgbackrest 2.4-1build1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms