#
#========================================================================
#
-# Version 2.0.0_CVS, released 18 Jan 2003.
+# Version 2.0.0_CVS, released 3 Feb 2003.
#
# See http://backuppc.sourceforge.net.
#
$RsyncLibOK = 0;
$RsyncLibErr = "File::RsyncP module doesn't exist";
} else {
- if ( $File::RsyncP::VERSION < 0.20 ) {
+ if ( $File::RsyncP::VERSION < 0.30 ) {
$RsyncLibOK = 0;
- $RsyncLibErr = "File::RsyncP module version too old: need 0.20";
+ $RsyncLibErr = "File::RsyncP module version too old: need 0.30";
} else {
$RsyncLibOK = 1;
}
#
# We add a slash to the share name we pass to rsync
#
- ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{};
+ ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{/};
if ( $t->{type} eq "restore" ) {
$rsyncClientCmd = $conf->{RsyncClientRestoreCmd};
# transferred, even though it is a full dump.
#
$rsyncArgs = $conf->{RsyncArgs};
+ $rsyncArgs = [@$rsyncArgs, @fileList] if ( @fileList );
$rsyncArgs = [@$rsyncArgs, "--ignore-times"]
if ( $t->{type} eq "full" );
$rsyncClientCmd = $conf->{RsyncClientCmd};
},
rsyncCmdType => "full",
rsyncArgs => $rsyncArgs,
+ timeout => $conf->{ClientTimeout},
logHandler => sub {
my($str) = @_;
$str .= "\n";
conf => $t->{conf},
backups => $t->{backups},
logLevel => $conf->{RsyncLogLevel},
- timeout => $conf->{ClientTimeout},
logHandler => sub {
my($str) = @_;
$str .= "\n";
#
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};
+ $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...
#