]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
fix: pv size virsh block device
authorBastian Dehn <hhaalo@arcor.de>
Mon, 19 Mar 2018 19:20:02 +0000 (20:20 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 19 Mar 2018 19:20:02 +0000 (20:20 +0100)
backup

diff --git a/backup b/backup
index e03f6d06c52dfd1e54393d66b5a4354d0efadfb1..3e67c57a084527fad93809b3d3a393045fdb4185 100755 (executable)
--- 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 \