## @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 \
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
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