From a6825cafd048de7b1f1dde24e0598a124a356354 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Thu, 22 Jun 2023 11:08:16 +0200
Subject: [PATCH] add docs for check_client_backup

---
 docs/20_Checks/_index.md              |  2 +-
 docs/20_Checks/check_client_backup.md | 67 +++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 docs/20_Checks/check_client_backup.md

diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md
index aa243fb..67f1e67 100644
--- a/docs/20_Checks/_index.md
+++ b/docs/20_Checks/_index.md
@@ -13,7 +13,7 @@ There is one include script used by all checks:
 * [check_ceph_io](check_ceph_io.md)
 * [check_ceph_osd](check_ceph_osd.md)
 * [check_ceph_status](check_ceph_status.md)
-* check_clientbackup
+* [check_clientbackup](check_clientbackup.md)
 * check_couchdb-lb
 * [check_cpu](check_cpu.md)
 * [check_cronstatus](check_cronstatus.md)
diff --git a/docs/20_Checks/check_client_backup.md b/docs/20_Checks/check_client_backup.md
new file mode 100644
index 0000000..df31899
--- /dev/null
+++ b/docs/20_Checks/check_client_backup.md
@@ -0,0 +1,67 @@
+# Check Client backup
+
+## Introduction
+
+**check_client_backup** is a plugin to show the backup status of IML Backup.
+
+📄 Source: https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/
+📜 License: GNU GPL 3.0
+📖 Docs: see docs folder or online https://os-docs.iml.unibe.ch/iml-backup/
+
+## Requirements
+
+* `IML Backup` must be installed.
+
+## Syntax
+
+```txt
+./check_clientbackup -h
+______________________________________________________________________
+
+CHECK_CLIENTBACKUP 
+v1.11
+
+(c) Institute for Medical Education - University of Bern
+Licence: GNU GPL 3
+______________________________________________________________________
+
+Show status of IML backup.
+See https://os-docs.iml.unibe.ch/iml-backup/
+
+It returns with state UNKNOWN if no backup has been performed yet.
+It switches to ERROR an error occured during backup process.
+
+SYNTAX:
+check_clientbackup [-d DIRECTORY]
+
+OPTIONS:
+    -h or --help   show this help.
+    -d or --dir    set installation dir of iml backup to find its check skript
+                   default: /opt/imlbackup/client/
+
+EXAMPLE:
+check_clientbackup -d /home/backup/imlbackup
+                   set a custom directory und run the backup check
+
+```
+
+## Examples
+
+`$ ./check_clientbackup -d ~/skripte/iml-backup/client/` returns
+
+```txt
+OK Client Backup - WITH transfer - last backup log: auto-20230622-091201.log (1 h ago)  OK: backup is younger than 24 hours  - OK: 10 ... Errors: 0
+
+--- transfer:
+__REPO__ OK, Backup repository already exists.
+__BACKUP__ OK - DIR /var/localdumps/backup
+__BACKUP__ OK - DIR /boot
+__BACKUP__ OK - DIR /etc
+__BACKUP__ OK - DIR /home
+
+__LAST__backup  1 h ago
+__LAST__prune   3 days ago
+__LAST__verify  1 days ago
+```
+
+If you have a database service (Mysql/ MariaD, Postgres, ...) you will get a list of dumped databases.
-- 
GitLab