From: Alan J. Pippin Date: Fri, 29 Jan 2010 05:14:15 +0000 (-0700) Subject: Added throttle option support X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/images/static/gitweb.css?a=commitdiff_plain;h=c322e317ccd7550337a622436db8e1e9bb48214c;p=zfs-ubuntu%2F.git Added throttle option support --- diff --git a/zfs-restore b/zfs-restore index 71ed8bd..b3c809a 100755 --- a/zfs-restore +++ b/zfs-restore @@ -76,7 +76,11 @@ fi if [[ -n "$SCRIPT_UNDER_TEST" ]]; then echo "$zfs send -R $src_pool/$last_backup_marker | ssh $dst_hostname $zfs recv -dv $dst_pool" else - $zfs send -R "$src_pool/$last_backup_marker" | ssh $dst_hostname "$zfs recv -dv $dst_pool" + if [[ $throttle_enable == 1 && -e $throttle ]]; then + $zfs send -R "$src_pool/$last_backup_marker" | $throttle $throttle_opt | ssh $dst_hostname "$zfs recv -dv $dst_pool" + else + $zfs send -R "$src_pool/$last_backup_marker" | ssh $dst_hostname "$zfs recv -dv $dst_pool" + fi fi # Now rename the dst filesystem (move it into place)