diff --git a/docs/10_Features.md b/docs/10_Features.md index 45027b8bde997be0bbf43a7f7be703f2b0b4e0e2..1927ee4eea64a81342d61cc79e6d2f085fb91ab5 100644 --- a/docs/10_Features.md +++ b/docs/10_Features.md @@ -7,6 +7,7 @@ * restore files files from backup storage * restic on linux: mount restic repository with fuse - then you can browse through snapshots and data like in a normal filesystem * restore a single database with some comfort +* a check script shows the local Backupstatus # How does it work? # diff --git a/docs/40_Usage/70_Backup_status.md b/docs/40_Usage/70_Backup_status.md new file mode 100644 index 0000000000000000000000000000000000000000..a9a110d01f6fb4df483f4f436c6bb6b0755ab8bf --- /dev/null +++ b/docs/40_Usage/70_Backup_status.md @@ -0,0 +1,55 @@ +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. + +```txt +> ./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 +```