]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add: help page with usage
authorBastian Dehn <hhaalo@arcor.de>
Sun, 8 Sep 2019 08:25:39 +0000 (10:25 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 8 Sep 2019 08:25:39 +0000 (10:25 +0200)
backup

diff --git a/backup b/backup
index 2e7d6aff686e7df3956f82f6807a08b15dc8cfdc..ef86d9ad55d33d9b1715adb6e8e8fca6214921aa 100755 (executable)
--- a/backup
+++ b/backup
@@ -1,27 +1,16 @@
 #!/bin/bash
 # vim: tabstop=8 colorcolumn=80
 
-#===============================================================================
-# Version:     2.6.5
-# Script:      backup
-# Syntax:      backup [full]
-#
-# Konfiguration:
-# ==============
-# rechner.txt - enthaelt die Rechnernamen zum Verbindungsaufbau
-# rechnername-pfad.txt - enthaelt die zu sichernden Pfade; Schluesselwort
-#      "virsh" sichert KVM Disks
-# SetDefaultVariables - individuell anpassen
-#
-# Beschreibung:
-# =============
-# Script legt ein Backup mit dem heutigen Datum an. Anhand vom vorhergegangenen
-# Backup wird mit Hardlinks referenziert. KVM mit einer Datei-Disk wird mit
-# Rsync kopiert. KVM Block-Devices werden mithilfe von dd und gzip kopiert.
-#
-# Author:      Bastian Dehn
-# E-Mail:      hhaalo@arcor.de
-#===============================================================================
+usage()
+{
+       echo "backup [full | check | help]"
+       echo
+       echo "full: Backup ohne Hardlinks auf das vorherige Backup"
+       echo "check: Information ueber die letzen Backups"
+       echo "help: zeigt diese Hilfe an"
+       echo
+       exit 0
+}
 
 SetDefaultVariables()
 {
@@ -47,6 +36,9 @@ ReadArguments()
                        CheckBackupDate
                        exit 0
                        ;;
+               "-h"|"--help"|"help")
+                       usage
+                       ;;
                *)
                        mode="incremental"
                        ;;