btrbk: make pv more useful by passing parameters.

Disabling the non-functional progress bar and
adding average and written byte counters.

Signed-off-by: Michael Düll <michael.duell@rub.de>

Remove -e option (-trab instead of -traeb).
Also add same options to btrfs_send_to_file().

Signed-off-by: Axel Burri <axel@tty0.ch>
pull/73/head
Michael Düll 2016-01-18 23:07:52 +01:00 committed by Axel Burri
parent 614438183f
commit 14c5c41e72
1 changed files with 2 additions and 2 deletions

4
btrbk
View File

@ -1293,7 +1293,7 @@ sub btrfs_send_receive($$$$)
catch_stderr => 1, # hack for shell-based run_cmd()
};
push @cmd_pipe, {
cmd => [ '/usr/bin/pv' ],
cmd => [ '/usr/bin/pv', '-trab' ],
} if($show_progress);
push @cmd_pipe, {
cmd => [ qw(btrfs receive), @receive_options, $target_path . '/' ],
@ -1391,7 +1391,7 @@ sub btrfs_send_to_file($$$$;@)
name => "btrfs send",
};
push @cmd_pipe, {
cmd => [ '/usr/bin/pv' ],
cmd => [ '/usr/bin/pv', '-trab' ],
} if($show_progress);
if($opts{compress}) {
die unless($compress{$opts{compress}});