"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/BackupPC/Xfer/Archive.pm" between
BackupPC-4.3.2.tar.gz and BackupPC-4.4.0.tar.gz

About: BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server’s disk (http/cgi user interface).

Archive.pm  (BackupPC-4.3.2):Archive.pm  (BackupPC-4.4.0)
skipping to change at line 31 skipping to change at line 31
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
#======================================================================== #========================================================================
# #
# Version 4.3.2, released 17 Feb 2020. # Version 4.4.0, released 20 Jun 2020.
# #
# See http://backuppc.sourceforge.net. # See http://backuppc.sourceforge.net.
# #
#======================================================================== #========================================================================
package BackupPC::Xfer::Archive; package BackupPC::Xfer::Archive;
use strict; use strict;
use base qw(BackupPC::Xfer::Protocol); use base qw(BackupPC::Xfer::Protocol);
sub start sub start
{ {
return "Archive Started"; return "Archive Started";
} }
sub run sub run
{ {
my($t) = @_; my($t) = @_;
my $bpc = $t->{bpc}; my $bpc = $t->{bpc};
my $conf = $t->{conf}; my $conf = $t->{conf};
my(@HostList, @BackupList, $archiveClientCmd, $archiveClientCmd2, $logMsg); my(@HostList, @BackupList, $archiveClientCmd, $archiveClientCmd2, $logMsg);
$archiveClientCmd = $conf->{ArchiveClientCmd}; $archiveClientCmd = $conf->{ArchiveClientCmd};
$t->{xferOK} = 1; $t->{xferOK} = 1;
@HostList = $t->{HostList}; @HostList = $t->{HostList};
@BackupList = $t->{BackupList}; @BackupList = $t->{BackupList};
my $i = 0; my $i = 0;
my $tarCreatePath = "$conf->{InstallDir}/bin/BackupPC_tarCreate"; my $tarCreatePath = "$conf->{InstallDir}/bin/BackupPC_tarCreate";
while (${@HostList[0]}[$i]) { while ( ${@HostList[0]}[$i] ) {
# #
# Merge variables into @archiveClientCmd # Merge variables into @archiveClientCmd
# #
my $errStr; my $errStr;
my $cmdargs = { my $cmdargs = {
archiveloc => $t->{archiveloc}, archiveloc => $t->{archiveloc},
parfile => $t->{parfile}, parfile => $t->{parfile},
compression => $t->{compression}, compression => $t->{compression},
compext => $t->{compext}, compext => $t->{compext},
splitsize => $t->{splitsize}, splitsize => $t->{splitsize},
host => ${@HostList[0]}[$i], host => ${@HostList[0]}[$i],
backupnumber => ${@BackupList[0]}[$i], backupnumber => ${@BackupList[0]}[$i],
Installdir => $conf->{InstallDir}, Installdir => $conf->{InstallDir},
tarCreatePath => $tarCreatePath, tarCreatePath => $tarCreatePath,
splitpath => $conf->{SplitPath}, splitpath => $conf->{SplitPath},
parpath => $conf->{ParPath}, parpath => $conf->{ParPath},
}; };
$archiveClientCmd2 = $bpc->cmdVarSubstitute($archiveClientCmd, $archiveClientCmd2 = $bpc->cmdVarSubstitute($archiveClientCmd, $cmdargs)
$cmdargs); ;
$t->{XferLOG}->write(\"Executing: @$archiveClientCmd2\n"); $t->{XferLOG}->write(\"Executing: @$archiveClientCmd2\n");
$bpc->cmdSystemOrEvalLong($archiveClientCmd2, $bpc->cmdSystemOrEvalLong(
$archiveClientCmd2,
sub { sub {
$errStr = $_[0]; $errStr = $_[0];
$t->{XferLOG}->write(\$_[0]); $t->{XferLOG}->write(\$_[0]);
}, 0, $t->{pidHandler}); },
0,
$t->{pidHandler}
);
if ( $? ) { if ( $? ) {
($t->{_errStr} = $errStr) =~ s/[\n\r]+//; ($t->{_errStr} = $errStr) =~ s/[\n\r]+//;
return; return;
} }
$i++; $i++;
} }
$t->{XferLOG}->write(\"Completed Archive\n"); $t->{XferLOG}->write(\"Completed Archive\n");
return "Completed Archive"; return "Completed Archive";
} }
 End of changes. 7 change blocks. 
12 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)