The script check_clientbackup.sh reads the logfiles and shows a summary of the last backup.

It returns with exitcode 0 if each backup action was OK (exitcode 0) and the file age of the youngest logfile is younger 24 hours.

> ./check_clientbackup.sh

  ___ ___ ___ ___         _______            __
 |   |   Y   |   |       |   _   .---.-.----|  |--.--.--.-----.
 |.  |.      |.  |       |.  1   |  _  |  __|    <|  |  |  _  |
 |.  |. \_/  |.  |___    |.  _   |___._|____|__|__|_____|   __|
 |:  |:  |   |:  1   |   |:  1    \                     |__|
 |::.|::.|:. |::.. . |   |::.. .  /
 `---`--- ---`-------'   `-------'

/home/axel/skripte/client/check_clientbackup.sh
_______________________________________________________________________________  ___  __   _

LAST LOGS: /home/axel/skripte/client/logs/auto-20221019-171050.log /home/axel/skripte/client/logs/transfer-20221019-171055.log

OK: 9 ... Errors: 0

>>> AGE
age: 82885 sec ... 23 h
OK: last backup is younger 24 hours

>>> Summary of database backup actions:
__DB__couchdb SKIP: couchdb seems not to be here
__DB__couchdb INFO: /home/axel/skripte/client/localdump.sh backup [couchdb] final returncode rc=0
__DB__couchdb2 SKIP: couchdb2 config does not seem to be here
__DB__couchdb2 INFO: /home/axel/skripte/client/localdump.sh backup [couchdb2] final returncode rc=0
__DB__ldap SKIP: LDAP seems not to be here
__DB__ldap INFO: /home/axel/skripte/client/localdump.sh backup [ldap] final returncode rc=0
__DB__mysql SKIP: service [mysql] is not avilable on this machine.
__DB__mysql INFO: /home/axel/skripte/client/localdump.sh backup  [mysql] final returncode rc=0
__DB__pgsql INFO: service [pgsql] is not avilable on this machine.
__DB__pgsql INFO: /home/axel/skripte/client/localdump.sh backup [pgsql] final returncode rc=0
__DB__sqlite INFO: /home/axel/skripte/client/localdump.sh backup [sqlite] final returncode rc=0

>>> Summary of transfer actions:
__REPO__ OK, Backup repository already exists.
__BACKUP__ OK - DIR /var/localdumps/backup
__BACKUP__ OK - DIR /boot
__BACKUP__ OK - DIR /etc
__BACKUP__ OK - DIR /home
__VERIFY__ OK

>>> Backup repository:
__LAST__backup  23 h ago
__LAST__prune   2 days ago
__LAST__verify  23 h ago

MONITORINFO: Client Backup - WITH transfer - last backup log: auto-20221019-171050.log (23 h ago)  OK: backup is younger than 24 hours  - OK: 10 ... Errors: 0
STATUS /home/axel/skripte/client/check_clientbackup.sh - final returncode rc=0