From: Bastian Dehn Date: Mon, 19 Mar 2018 19:20:02 +0000 (+0100) Subject: fix: pv size virsh block device X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=fa7d6ebc684ed14ff893a4decca6e98f9fa19d22;p=simple-backup.git fix: pv size virsh block device --- diff --git a/backup b/backup index e03f6d0..3e67c57 100755 --- a/backup +++ b/backup @@ -82,8 +82,8 @@ BackupVMDiscs() { local readonly DiskName=$(echo $Disk \ | sed 's/^\///' | sed 's/\//-/g') local readonly DiskSize=$(ssh $remoteLogin fdisk -l $Disk \ - | head -n 1 | awk -F "," '{print $2'} \ - | sed 's/[ \| bytes]//g') + | head -n 1 | awk -F "," '{print $2}' \ + | sed 's/[ \| Bbytes]//g') ssh $remoteLogin dd bs=1M if=$Disk \ | pv -s $DiskSize | gzip -c \