]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add: Fehlermeldung pfad Datei
authorBastian Dehn <hhaalo@arcor.de>
Wed, 7 Nov 2018 18:58:42 +0000 (19:58 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 7 Nov 2018 18:58:42 +0000 (19:58 +0100)
backup

diff --git a/backup b/backup
index eb3b3215951f705c0dc6902c3bb524e3b5a21827..cad62debf9a3789c6a19de8da9c78c9b3f6e24f3 100755 (executable)
--- a/backup
+++ b/backup
@@ -30,7 +30,7 @@ SetDefaultVariables()
        mode="incremental"
 
        if [ ! -d "$backpath" ]; then
-               printf "FEHLER: %s existiert nicht!\n" "$backpath"
+               printf "FEHLER: Verzeichnis %s existiert nicht!\n" "$backpath"
                exit 1
        fi
 }
@@ -228,6 +228,10 @@ BackupPackages()
 
 BackupPathes()
 {
+       if [ ! -f "pfad-$remoterechner" ]; then
+               printf "FEHLER: pfad-%s existiert nicht!\n" "$remoterechner"
+       fi
+
        for pfad in $(cat pfad-$remoterechner.txt); do
                if [ "$pfad" == "virsh" ]; then
                        BackupVMs
@@ -242,11 +246,12 @@ BackupPathes()
 BackupRemotePC()
 {
        if [ ! -f "rechner" ]; then
-               printf "FEHLER: file rechner not exists!\n"
+               printf "FEHLER: Datei rechner existiert nicht!\n"
                exit 1
        fi
 
        local rech=""
+
        for rech in $(cat rechner); do
                CreateBackupFolderRemotePC
                GetHardLinkOpts