backDir="$(date +%Y-%m-%d)"_"$fullnum"_"$backname"
done
- tmpordner=$(find $backpath -maxdepth 1 -type d \
- -name "*_"$backname"" \
- | sort \
- | tail --lines=1)
+ tmpordner=$(find $backpath -maxdepth 1 -type d -name "*_"$backname"" \
+ | sort | tail --lines=1)
lastBackDir=${tmpordner##*/}
}
BackupOfflineVMs()
{
- offlineVM=$(ssh $remoteLogin virsh list --all \
- | grep 'shut off' \
+ offlineVM=$(ssh $remoteLogin virsh list --all | grep 'shut off' \
| awk '{print $2}')
for VM in $offlineVM; do
CleanUpBackups()
{
- backupanzahl=$(ls --directory $backpath/*/ \
- | grep "_$backname" \
- | sort \
+ backupanzahl=$(ls --directory $backpath/*/ | grep "_$backname" | sort \
| wc --lines)
loeschanzahl=$(($backupanzahl - $wunschanzahl))