#
#========================================================================
#
-# Version 1.6.0_CVS, released 10 Dec 2002.
+# Version 2.0.0_CVS, released 18 Jan 2003.
#
# See http://backuppc.sourceforge.net.
#
$remoteDir =~ s{//+}{/}g;
$argList = ['--server', @$rsyncArgs, '.', $remoteDir];
$fioArgs = {
- host => $t->{bkupSrcHost},
+ client => $t->{bkupSrcHost},
share => $t->{bkupSrcShare},
viewNum => $t->{bkupSrcNum},
fileList => $t->{fileList},
$argList = ['--server', '--sender', @$rsyncArgs,
'.', $t->{shareNameSlash}];
$fioArgs = {
- host => $t->{host},
+ client => $t->{client},
share => $t->{shareName},
viewNum => $t->{lastFullBkupNum},
};
#
# Merge variables into $rsyncClientCmd
#
- $rsyncClientCmd = $bpc->cmdVarSubstitute($rsyncClientCmd,
- {
- host => $t->{host},
- hostIP => $t->{hostIP},
- shareName => $t->{shareName},
- shareNameSlash => $t->{shareNameSlash},
- rsyncPath => $conf->{RsyncClientPath},
- sshPath => $conf->{SshPath},
- argList => $argList,
- });
+ my $args = {
+ host => $t->{host},
+ hostIP => $t->{hostIP},
+ client => $t->{client},
+ shareName => $t->{shareName},
+ shareNameSlash => $t->{shareNameSlash},
+ rsyncPath => $conf->{RsyncClientPath},
+ sshPath => $conf->{SshPath},
+ argList => $argList,
+ };
+ $rsyncClientCmd = $bpc->cmdVarSubstitute($rsyncClientCmd, $args);
#
# Create the Rsync object, and tell it to use our own File::RsyncP::FileIO
$t->{rs} = File::RsyncP->new({
logLevel => $conf->{RsyncLogLevel},
rsyncCmd => sub {
- $bpc->cmdExecOrEval($rsyncClientCmd);
+ $bpc->cmdExecOrEval($rsyncClientCmd, $args);
},
rsyncCmdType => "full",
rsyncArgs => $rsyncArgs,
#
# Run rsync command
#
- $t->{XferLOG}->write(\"Running: @{$t->{rsyncClientCmd}}\n");
+ my $str = "Running: "
+ . $t->{bpc}->execCmd2ShellCmd(@{$t->{rsyncClientCmd}})
+ . "\n";
+ $t->{XferLOG}->write(\$str);
$rs->remoteStart($remoteSend, $remoteDir);
} else {
#
if ( defined(my $err = $rs->serverConnect($t->{hostIP},
$conf->{RsyncdClientPort})) ) {
$t->{hostError} = $err;
+ my $str = "Error connecting to rsync daemon at $t->{hostIP}"
+ . ":$conf->{RsyncdClientPort}: $err\n";
+ $t->{XferLOG}->write(\$str);
return;
}
#
$conf->{RsyncdUserName},
$conf->{RsyncdPasswd},
$conf->{RsyncdAuthRequired})) ) {
+ my $str = "Error connecting to module $module at $t->{hostIP}"
+ . ":$conf->{RsyncdClientPort}: $err\n";
+ $t->{XferLOG}->write(\$str);
$t->{hostError} = $err;
return;
}