From fa7d6ebc684ed14ff893a4decca6e98f9fa19d22 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Mon, 19 Mar 2018 20:20:02 +0100 Subject: [PATCH] fix: pv size virsh block device --- backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 \ -- 2.39.5