# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2002 Craig Barratt
+# Copyright (C) 2002-2003 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.0.0_CVS, released 3 Feb 2003.
+# Version 2.1.0_CVS, released 3 Jul 2003.
#
# See http://backuppc.sourceforge.net.
#
$RsyncLibOK = 0;
$RsyncLibErr = "File::RsyncP module doesn't exist";
} else {
- if ( $File::RsyncP::VERSION < 0.30 ) {
+ if ( $File::RsyncP::VERSION < 0.41 ) {
$RsyncLibOK = 0;
- $RsyncLibErr = "File::RsyncP module version too old: need 0.30";
+ $RsyncLibErr = "File::RsyncP module version too old: need 0.41";
} else {
$RsyncLibOK = 1;
}
$t->{rs} = File::RsyncP->new({
logLevel => $conf->{RsyncLogLevel},
rsyncCmd => sub {
+ $bpc->verbose(0);
$bpc->cmdExecOrEval($rsyncClientCmd, $args);
},
rsyncCmdType => "full",
rsyncArgs => $rsyncArgs,
timeout => $conf->{ClientTimeout},
logHandler => sub {
- my($str) = @_;
- $str .= "\n";
- $t->{XferLOG}->write(\$str);
+ my($str) = @_;
+ $str .= "\n";
+ $t->{XferLOG}->write(\$str);
},
+ pidHandler => sub {
+ $t->{pidHandler}(@_);
+ },
fio => BackupPC::Xfer::RsyncFileIO->new({
xfer => $t,
bpc => $t->{bpc},
#
my $stats = $rs->statsFinal;
if ( !defined($error) && defined($stats) ) {
- $t->{xferOK} = 1;
+ $t->{xferOK} = 1;
} else {
- $t->{xferOK} = 0;
+ $t->{xferOK} = 0;
}
- $t->{byteCnt} = $stats->{childStats}{TotalFileSize}
- + $stats->{parentStats}{TotalFileSize};
- $t->{fileCnt} = $stats->{childStats}{TotalFileCnt}
- + $stats->{parentStats}{TotalFileCnt};
+ $t->{xferErrCnt} = $stats->{remoteErrCnt}
+ + $stats->{childStats}{errorCnt}
+ + $stats->{parentStats}{errorCnt};
+ $t->{byteCnt} = $stats->{childStats}{TotalFileSize}
+ + $stats->{parentStats}{TotalFileSize};
+ $t->{fileCnt} = $stats->{childStats}{TotalFileCnt}
+ + $stats->{parentStats}{TotalFileCnt};
+ my $str = "Done: $t->{fileCnt} files, $t->{byteCnt} bytes\n";
+ $t->{XferLOG}->write(\$str);
#
# TODO: get error count, and call fio to get stats...
#
{
my($t) = @_;
- return -1;
+ return ();
}
sub logMsg