From: Alan J. Pippin Date: Thu, 14 Feb 2019 05:51:45 +0000 (-0700) Subject: Added --compressed flag to zfs send cmds X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/%7Blink_visit%7D?a=commitdiff_plain;h=f1a0eaf6cb15faf514577513f17fa9a06c34d129;p=zfs-ubuntu%2F.git Added --compressed flag to zfs send cmds Change-Id: I010c927fa250f739ccd6c62c0882be2066fd9562 --- diff --git a/zfs-replicate b/zfs-replicate index 9f72b06..b3f7cff 100755 --- a/zfs-replicate +++ b/zfs-replicate @@ -201,7 +201,7 @@ if [ $no_markers == 0 ]; then fatal_and_exit "-E- remote incremental $zfs rollback command failed on $hostname" $mailto fi # Now it should be safe to send the snaps - replicate "$zfs send -R -I${previous_backup_marker} ${current_backup_marker}" + replicate "$zfs send -Rc -I${previous_backup_marker} ${current_backup_marker}" if [ $? != 0 ]; then fatal_and_exit "-E- remote incremental $zfs send command failed on $hostname" $mailto fi @@ -220,7 +220,7 @@ else if [[ -n "$common" ]]; then # We found a common snapshot, incrementally send the new snaps - replicate "$zfs send -R -I${common/*@/@} ${current_backup_marker}" + replicate "$zfs send -Rc -I${common/*@/@} ${current_backup_marker}" if [ $? != 0 ]; then fatal_and_exit "-E- remote incremental $zfs send command failed on $hostname" $mailto fi @@ -242,7 +242,7 @@ else fi fi # Send the full filesystem - replicate "$zfs send -R ${current_backup_marker}" + replicate "$zfs send -Rc ${current_backup_marker}" if [ $? != 0 ]; then fatal_and_exit "-E- remote full $zfs send command failed on $hostname" $mailto fi diff --git a/zfs-restore b/zfs-restore index fab2b6e..4014ff7 100755 --- a/zfs-restore +++ b/zfs-restore @@ -80,12 +80,12 @@ fi # Now send the src filesystem if [[ -n "$SCRIPT_UNDER_TEST" ]]; then - echo "$zfs send -R $src_pool/$last_backup_marker | $ssh $dst_hostname $zfs recv -dv $dst_pool" + echo "$zfs send -Rc $src_pool/$last_backup_marker | $ssh $dst_hostname $zfs recv -dv $dst_pool" else 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 + $zfs send -Rc "$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 + $zfs send -Rc "$src_pool/$last_backup_marker" | $ssh $dst_hostname $zfs recv -dv $dst_pool fi fi