]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
change: vm grep title
authorBastian Dehn <hhaalo@arcor.de>
Sun, 15 Aug 2021 19:54:31 +0000 (21:54 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 15 Aug 2021 19:58:22 +0000 (21:58 +0200)
backup

diff --git a/backup b/backup
index a52dc8256443c2f49d3c9b3d2f19df9632eac8a1..c28b40d25ba157fbc7c584ff491020bdf2478382 100755 (executable)
--- a/backup
+++ b/backup
@@ -125,13 +125,13 @@ printfStripLine()
 ## @brief Erstellt ein VM Backup mit dem Typ file oder block
 BackupTypOfVMDisc()
 {
-       if [ "$DiskType" == "file" ]; then
+       if [ "$DiskType" == "File" ]; then
                rsync --archive --verbose --sparse --acls --hard-links \
                        --relative --progress --human-readable \
                        --log-file=$logFile $hardlinkopt \
                        -rsh "ssh -p $remoteport" $remoteLogin:$Disk \
                        $backRemotePCPath
-       elif [ "$DiskType" == "block" ]; then
+       elif [ "$DiskType" == "Block" ]; then
                local readonly DiskName=$(echo $Disk | sed 's/^\///' \
                        | sed 's/\//-/g')
                local readonly DiskSize=$(ssh -p  $remoteport $remoteLogin \
@@ -167,7 +167,7 @@ BackupVMDiscs()
                printf "${LIGHTBLUE}%s${RESET} wird gesichert\n\n" "$VM"
 
                DiskType=$(ssh -p $remoteport $remoteLogin virsh vol-info \
-                       $Disk | grep Type | awk '{print $2}')
+                       $Disk | grep Typ | awk '{print $2}')
                logFile="$backRemotePCPath/backup-$(echo $Disk \
                        | sed 's/\//-/g').log"
                BackupTypOfVMDisc
@@ -211,7 +211,7 @@ BackupOnlineVMs()
 BackupOfflineVMs()
 {
        offlineVM=$(ssh -p $remoteport $remoteLogin virsh list --all \
-               | grep 'shut off' | awk '{print $2}')
+               | grep 'ausgeschalten' | awk '{print $2}')
 
        for VM in $offlineVM; do
                printfStripLine