Skip to content

Commit

Permalink
Merge pull request #48 from zgypa/master
Browse files Browse the repository at this point in the history
-D flag fails with error when run on Linux.
  • Loading branch information
allanjude authored Feb 20, 2019
2 parents bb94b12 + 387dc85 commit 1cc89cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zxfer
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ copy_snap() {
echo "Estimated size is: ${SIZE_EST}"
PROGRESS_DIALOG=$( echo "$option_D" | sed "s#%%size%%#$SIZE_EST#g" | \
sed "s#%%title%%#$copysrc#g" )
$LZFS send "$copysrc" | dd obs=1m | dd bs=1m | $PROGRESS_DIALOG | \
$LZFS send "$copysrc" | dd obs=1048576 | dd bs=1048576 | $PROGRESS_DIALOG | \
$RZFS receive $option_F "$copydest" || \
{ echo "Error when zfs send/receiving."; beep; exit 1; }
else
Expand All @@ -422,7 +422,7 @@ copy_snap() {
PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \
sed "s#%%title%%#$copysrc#g" )
$LZFS send -nv "$copysrc"
echo "$LZFS send $copysrc | dd obs=1m | dd bs=1m | $PROGRESS_DIALOG |
echo "$LZFS send $copysrc | dd obs=1048576 | dd bs=1048576 | $PROGRESS_DIALOG |
$RZFS receive $option_F $copydest"
fi
else
Expand All @@ -443,7 +443,7 @@ copy_snap() {
echo "Estimated size is: ${SIZE_EST}"
PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \
sed "s#%%title%%#$copysrc#g" )
$LZFS send -i "$copyprev" "$copysrc" | dd obs=1m | dd bs=1m | \
$LZFS send -i "$copyprev" "$copysrc" | dd obs=1048576 | dd bs=1048576 | \
$PROGRESS_DIALOG | $RZFS receive $option_F "$copydest" || \
{ echo "Error when zfs send/receiving."; beep; exit 1; }
else
Expand All @@ -454,7 +454,7 @@ copy_snap() {
PROGRESS_DIALOG=$( echo $option_D | sed "s#%%size%%#$SIZE_EST#g" | \
sed "s#%%title%%#$copysrc#g" )
$LZFS send -nv -i "$copyprev" "$copysrc"
echo "$LZFS send -i $copyprev $copysrc | dd obs=1m | dd bs=1m | \
echo "$LZFS send -i $copyprev $copysrc | dd obs=1048576 | dd bs=1048576 | \
$PROGRESS_DIALOG | $RZFS receive $option_F $copydest"
fi
else
Expand Down

0 comments on commit 1cc89cc

Please sign in to comment.