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/%7Blink_visit%7D?a=commitdiff_plain;h=refs%2Fremotes%2Fbackup%2Fmaster;p=zfs-nexenta%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)