From: Bastian Dehn Date: Sun, 31 Dec 2017 10:47:31 +0000 (+0100) Subject: fix: wrong log name X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=ab91d891e80e73bb03cb082afeb97af3562edf95;p=simple-backup.git fix: wrong log name --- diff --git a/backup b/backup index 34262f0..3fd1898 100755 --- a/backup +++ b/backup @@ -61,11 +61,14 @@ BackupVMDiscs() { local readonly Disks=$(ssh $remoteLogin virsh domblklist $VM --details \ | grep disk \ | awk '{print $4}') - local readonly logFile="$backRemotePCPath/backup-$(echo $Disk \ - | sed 's/\//-/g').log" + local logFile="" for Disk in $Disks; do printf "Disk %s von %s wird gesichert\n\n" "$Disk" "$VM" + + logFile="$backRemotePCPath/backup-$(echo $Disk \ + | sed 's/\//-/g').log" + rsync --archive --verbose --sparse --acls --hard-links \ --relative --progress --human-readable \ --log-file=$logFile \ diff --git a/backup-einfach b/backup-einfach index 39af6e8..2e36d45 100755 --- a/backup-einfach +++ b/backup-einfach @@ -20,14 +20,16 @@ printfStripLine() { } BackupPathes() { - local readonly logFile="$backRemotePCPath/backup-$(echo $pfad \ - | sed 's/\//-/g').log" + local logFile="" for pfad in $(cat pfad-$remoterechner.txt); do printfStripLine printf "\nRechner %s; Pfad %s" "$remoterechner" "$pfad" printf " wird gesichert\n\n" + logFile="$backRemotePCPath/backup-$(echo $pfad \ + | sed 's/\//-/g').log" + rsync --archive --verbose --sparse --acls --hard-links \ --relative --human-readable --delete \ --log-file=$logFile \