From 99b9efe77451800084c477ed2139100f830cb7db Mon Sep 17 00:00:00 2001 From: cbarratt Date: Tue, 6 Sep 2005 04:52:10 +0000 Subject: [PATCH] * Changes for 2.1.2 release. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Fixed simple but serious bug in bin/BackupPC_tarCreate that prevented hardlinks being saved correctly. Debugged by Michael (mna.news) with several other people. * Fixed serious bug in bin/BackupPC_dump reported/debugged by Dan Niles that can happen when multiple full backups are deleted after $Conf{FullKeepCnt} is changed. * Changed lib/BackupPC/CGI/Lib.pm so that link to "$TopDir/conf/$host.pl" is displayed if it exists. Patch from Andreas Vögele. * Applied daemonize patch to bin/BackupPC from: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301057 * It's now a fatal error if $Conf{CompressLevel} is set, but Compress::Zlib is not found. Before $Conf{CompressLevel} was silently set to 0, which made all the backups uncompressed. That meant the user never knew if they forget to install Compress::Zlib but were expecting compression to be on. * Finally increased $Conf{ClientTimeout} to 72000 (20 hours). * Added sleep 1 in restart() function in init.d/src/gentoo-backuppc, suggested by Jon Hood. * Added $DestDir to the path of the CGI image directory in configure.pl. Patch submitted by Andreas Vögele. * Applied extensive patch to French translation from Frederic Lehobey. * Minor change to Dutch language $Lang{Pool_Stat} from Wander Winkelhorst. * Minor change to French language $Lang{EMailOutlookBackupMesg} and $Lang{EMailOutlookBackupSubj} from Ludovic Gasc. --- ChangeLog | 72 ++++++++++++++++++++++++++ bin/BackupPC | 43 ++++++++++++++-- bin/BackupPC_archive | 9 ++-- bin/BackupPC_archiveHost | 6 +-- bin/BackupPC_compressPool | 4 +- bin/BackupPC_dump | 20 ++++++-- bin/BackupPC_link | 4 +- bin/BackupPC_nightly | 4 +- bin/BackupPC_restore | 9 ++-- bin/BackupPC_sendEmail | 8 +-- bin/BackupPC_serverMesg | 4 +- bin/BackupPC_tarCreate | 20 +++++--- bin/BackupPC_tarExtract | 34 +++++++++++- bin/BackupPC_trashClean | 4 +- bin/BackupPC_zcat | 4 +- bin/BackupPC_zipCreate | 4 +- cgi-bin/BackupPC_Admin | 6 +-- conf/config.pl | 10 ++-- configure.pl | 2 +- doc-src/BackupPC.pod | 17 ++++-- init.d/src/gentoo-backuppc | 1 + lib/BackupPC/Attrib.pm | 2 +- lib/BackupPC/CGI/AdminOptions.pm | 2 +- lib/BackupPC/CGI/Archive.pm | 2 +- lib/BackupPC/CGI/ArchiveInfo.pm | 2 +- lib/BackupPC/CGI/Browse.pm | 2 +- lib/BackupPC/CGI/DirHistory.pm | 2 +- lib/BackupPC/CGI/EmailSummary.pm | 2 +- lib/BackupPC/CGI/GeneralInfo.pm | 2 +- lib/BackupPC/CGI/HostInfo.pm | 2 +- lib/BackupPC/CGI/LOGlist.pm | 2 +- lib/BackupPC/CGI/Lib.pm | 9 ++-- lib/BackupPC/CGI/Queue.pm | 2 +- lib/BackupPC/CGI/ReloadServer.pm | 2 +- lib/BackupPC/CGI/Restore.pm | 2 +- lib/BackupPC/CGI/RestoreFile.pm | 5 +- lib/BackupPC/CGI/RestoreInfo.pm | 2 +- lib/BackupPC/CGI/StartServer.pm | 2 +- lib/BackupPC/CGI/StartStopBackup.pm | 2 +- lib/BackupPC/CGI/StopServer.pm | 2 +- lib/BackupPC/CGI/Summary.pm | 2 +- lib/BackupPC/CGI/View.pm | 2 +- lib/BackupPC/FileZIO.pm | 2 +- lib/BackupPC/Lang/fr.pm | 80 ++++++++++++++--------------- lib/BackupPC/Lang/it.pm | 4 +- lib/BackupPC/Lang/nl.pm | 3 +- lib/BackupPC/Lib.pm | 10 ++-- lib/BackupPC/PoolWrite.pm | 2 +- lib/BackupPC/View.pm | 32 ++++++------ lib/BackupPC/Xfer/Archive.pm | 2 +- lib/BackupPC/Xfer/Rsync.pm | 7 +-- lib/BackupPC/Xfer/RsyncDigest.pm | 2 +- lib/BackupPC/Xfer/RsyncFileIO.pm | 2 +- lib/BackupPC/Xfer/Smb.pm | 2 +- lib/BackupPC/Xfer/Tar.pm | 2 +- lib/BackupPC/Zip/FileMember.pm | 2 +- makeDist | 6 +-- makePatch | 4 +- 58 files changed, 335 insertions(+), 164 deletions(-) diff --git a/ChangeLog b/ChangeLog index a296a1c..ad28088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,78 @@ #------------------------------------------------------------------------ # Version __VERSION__, __RELEASEDATE__ #------------------------------------------------------------------------ + +* Fixed simple but serious bug in bin/BackupPC_tarCreate that prevented + hardlinks being saved correctly. Debugged by Michael (mna.news) + with several other people. + +* Fixed serious bug in bin/BackupPC_dump reported/debugged by Dan Niles + that can happen when multiple full backups are deleted after + $Conf{FullKeepCnt} is changed. + +* Changed lib/BackupPC/CGI/Lib.pm so that link to "$TopDir/conf/$host.pl" + is displayed if it exists. Patch from Andreas Vögele. + +* Applied daemonize patch to bin/BackupPC from: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301057 + +* It's now a fatal error if $Conf{CompressLevel} is set, but + Compress::Zlib is not found. Before $Conf{CompressLevel} was + silently set to 0, which made all the backups uncompressed. + That meant the user never knew if they forget to install + Compress::Zlib but were expecting compression to be on. + +* Finally increased $Conf{ClientTimeout} to 72000 (20 hours). + +* Added sleep 1 in restart() function in init.d/src/gentoo-backuppc, + suggested by Jon Hood. + +* Added $DestDir to the path of the CGI image directory in configure.pl. + Patch submitted by Andreas Vögele. + +* Applied extensive patch to French translation from Frederic Lehobey. + +* Minor change to Dutch language $Lang{Pool_Stat} from Wander Winkelhorst. + +* Minor change to French language $Lang{EMailOutlookBackupMesg} and + $Lang{EMailOutlookBackupSubj} from Ludovic Gasc. + +#------------------------------------------------------------------------ +# Version 2.1.1, 13 Mar 2005 +#------------------------------------------------------------------------ + + * Fixed bug in top-level restore using rsync XferMethod. + BackupPC::View was leaving an extra leading "/" at the start + of top-level directories, messing up the FileList sort order. + Reported and debugged by Gail Edwards. + + * Added pathCreate() to BackupPC_tarExtract so that new directories + are created. Required for xtar on MacOSX since the virtual resource + fork directories (.rsrc) are not explicitly included in the tar + archive - just the files below .rsrc are. + + * Changed $host.$bkupNum.tar$fileExt.* to $host.$bkupNum.tar$fileExt* + in $parCmd in bin/BackupPC_archiveHost. + + * Fixed HostSortCompare() in BackupPC to correctly sort hosts so + those with the oldest backups get queued first. + + * Changed test in BackupPC_sendEmail so that directories/files + starting with "." in $TopDir/pc are ignored, rather than + just "." and "..". + + * Changed BackupPC_sendEmail to include NT_STATUS_FILE_LOCK_CONFLICT + in check for bad outlook files. + + * Ensure that %Status and %StatusHost are empty if requesting + status on hosts in lib/BackupPC/CGI/Lib.pm GetStatusInfo(). + Fixes problem with new hosts under mod_perl. + + * Added images/icon-hardlink.gif so that hardlinks show file type icon. + +#------------------------------------------------------------------------ +# Version 2.1.0pl1, 15 Aug 2004 +#------------------------------------------------------------------------ * Added fix to lib/BackupPC/Lang/nl.pm from Lieven Bridts. diff --git a/bin/BackupPC b/bin/BackupPC index 5304e61..cd69f03 100755 --- a/bin/BackupPC +++ b/bin/BackupPC @@ -47,7 +47,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -56,7 +56,7 @@ use strict; no utf8; use vars qw(%Status %Info $Hosts); -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; @@ -66,6 +66,7 @@ use Getopt::Std; use Socket; use Carp; use Digest::MD5; +use POSIX qw(setsid); ########################################################################### # Handle command line options @@ -260,10 +261,22 @@ sub Main_Initialize if ( $opts{d} ) { # - # daemonize by forking + # daemonize by forking; more robust method per: + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301057 # - defined(my $pid = fork) or die "Can't fork: $!"; + my $pid; + defined($pid = fork) or die("Can't fork: $!"); + exit if( $pid ); # parent exits + + POSIX::setsid(); + defined($pid = fork) or die("Can't fork: $!"); exit if $pid; # parent exits + + chdir ("/") or die("Cannot chdir to /: $!\n"); + close(STDIN); + open(STDIN , ">/dev/null") or die("Cannot open /dev/null as stdin\n"); + # STDOUT and STDERR are handled in LogFileOpen() right below, + # otherwise we would have to reopen them too. } # @@ -922,6 +935,7 @@ sub Main_Check_Job_Messages delete($Status{$host}{error}); delete($Status{$host}{errorTime}); $Status{$host}{endTime} = time; + $Status{$host}{lastGoodBackupTime} = time; } elsif ( $mesg =~ /^backups disabled/ ) { print(LOG $bpc->timeStamp, "Ignoring old backup error on $host\n"); @@ -1540,11 +1554,30 @@ sub StatusWrite # sub HostSortCompare { + # + # Hosts with errors go before hosts without errors + # return -1 if ( $Status{$a}{error} ne "" && $Status{$b}{error} eq "" ); + + # + # Hosts with no errors go after hosts with errors + # + return 1 if ( $Status{$a}{error} eq "" && $Status{$b}{error} ne "" ); - return $Status{$a}{endTime} <=> $Status{$b}{endTime}; + + # + # hosts with the older last good backups sort earlier + # + my $r = $Status{$a}{lastGoodBackupTime} <=> $Status{$b}{lastGoodBackupTime}; + return $r if ( $r ); + + # + # Finally, just sort based on host name + # + return $a cmp $b; } + # # Queue all the hosts for backup. This means queuing all the fixed # ip hosts and all the dhcp address ranges. We also additionally diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive index 6ab75ea..2fedf68 100644 --- a/bin/BackupPC_archive +++ b/bin/BackupPC_archive @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -37,7 +37,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; use BackupPC::Xfer::Archive; @@ -139,7 +139,10 @@ if ( $Conf{ClientNameAlias} ne "" ) { # # Setup file extension for compression and open ArchiveLOG output file # -$Conf{CompressLevel} = 0 if ( !BackupPC::FileZIO->compOk ); +if ( $Conf{CompressLevel} && !BackupPC::FileZIO->compOk ) { + $stat{hostError} = "Compress::Zlib not found"; + exit(ArchiveCleanup($client)); +} my $fileExt = $Conf{CompressLevel} > 0 ? ".z" : ""; my $ArchiveLOG = BackupPC::FileZIO->open("$Dir/ArchiveLOG$fileExt", 1, $Conf{CompressLevel}); diff --git a/bin/BackupPC_archiveHost b/bin/BackupPC_archiveHost index 4bad6c6..c499e44 100755 --- a/bin/BackupPC_archiveHost +++ b/bin/BackupPC_archiveHost @@ -38,7 +38,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -46,7 +46,7 @@ use strict; use File::Path; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; # @@ -129,7 +129,7 @@ if ( $ret ) { if ( -d $outLoc && -x $parPath ) { if ( $parfile != 0 ) { print("Running $parPath to create parity files\n"); - my $parCmd = "$parPath c -r$parfile $outLoc/$host.$bkupNum.tar$fileExt.par2 $outLoc/$host.$bkupNum.tar$fileExt.*"; + my $parCmd = "$parPath c -r$parfile $outLoc/$host.$bkupNum.tar$fileExt.par2 $outLoc/$host.$bkupNum.tar$fileExt*"; $ret = system($parCmd); if ( $ret ) { print("Executing: $parCmd\n"); diff --git a/bin/BackupPC_compressPool b/bin/BackupPC_compressPool index 1c577c4..a8caa4f 100755 --- a/bin/BackupPC_compressPool +++ b/bin/BackupPC_compressPool @@ -49,7 +49,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -62,7 +62,7 @@ use File::Find; use File::Path; use Compress::Zlib; use Getopt::Std; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index c37e239..592fb59 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -70,7 +70,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -78,7 +78,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; use BackupPC::Xfer::Smb; @@ -434,7 +434,11 @@ $bpc->RmTreeDefer("$TopDir/trash", "$Dir/new") if ( -d "$Dir/new" ); # # Setup file extension for compression and open XferLOG output file # -$Conf{CompressLevel} = 0 if ( !BackupPC::FileZIO->compOk ); +if ( $Conf{CompressLevel} && !BackupPC::FileZIO->compOk ) { + print(LOG $bpc->timeStamp, "dump failed: can't find Compress::Zlib\n"); + print("dump failed: can't find Compress::Zlib\n"); + exit(1); +} my $fileExt = $Conf{CompressLevel} > 0 ? ".z" : ""; my $XferLOG = BackupPC::FileZIO->open("$Dir/XferLOG$fileExt", 1, $Conf{CompressLevel}); @@ -1110,6 +1114,7 @@ sub BackupExpire $fullKeepCnt = [$fullKeepCnt] if ( ref($fullKeepCnt) ne "ARRAY" ); my $fullAgeMax; my $fullPeriod = int(0.5 + $Conf{FullPeriod}); + $fullPeriod = 7 if ( $fullPeriod <= 0 ); for ( my $i = 0 ; $i < @$fullKeepCnt ; $i++ ) { $fullAgeMax += $fullKeepCnt->[$i] * $fullPeriod; $fullPeriod *= 2; @@ -1196,8 +1201,8 @@ sub BackupFullExpire # # Delete the full backup # - #printf("Deleting backup $i ($prevFull)\n"); - push(@delete, $i); + #print("Deleting backup $i ($prevFull)\n"); + unshift(@delete, $i); } else { $fullCnt++; while ( $fullKeepIdx < @$fullKeepCnt @@ -1338,6 +1343,11 @@ sub BackupRemove my($client, $Backups, $idx) = @_; my($Dir) = "$TopDir/pc/$client"; + if ( $Backups->[$idx]{num} eq "" ) { + print("BackupRemove: ignoring empty backup number for idx $idx\n"); + return; + } + $bpc->RmTreeDefer("$TopDir/trash", "$Dir/$Backups->[$idx]{num}"); unlink("$Dir/SmbLOG.$Backups->[$idx]{num}") diff --git a/bin/BackupPC_link b/bin/BackupPC_link index c7e925d..20fc627 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -47,7 +47,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::Attrib; use BackupPC::PoolWrite; diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly index 54206c2..f7df54c 100755 --- a/bin/BackupPC_nightly +++ b/bin/BackupPC_nightly @@ -52,7 +52,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -60,7 +60,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; use Getopt::Std; diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore index 5389e7d..565563f 100755 --- a/bin/BackupPC_restore +++ b/bin/BackupPC_restore @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -37,7 +37,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; use BackupPC::Xfer::Smb; @@ -186,7 +186,10 @@ if ( (my $errMsg = CorrectHostCheck($hostIP, $host)) ) { # # Setup file extension for compression and open RestoreLOG output file # -$Conf{CompressLevel} = 0 if ( !BackupPC::FileZIO->compOk ); +if ( $Conf{CompressLevel} && !BackupPC::FileZIO->compOk ) { + $stat{hostError} = "Compress:Zlib not found"; + exit(RestoreCleanup($client)); +} my $fileExt = $Conf{CompressLevel} > 0 ? ".z" : ""; my $RestoreLOG = BackupPC::FileZIO->open("$Dir/RestoreLOG$fileExt", 1, $Conf{CompressLevel}); diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail index bd9a440..9a4ab7c 100755 --- a/bin/BackupPC_sendEmail +++ b/bin/BackupPC_sendEmail @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -39,7 +39,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; @@ -122,7 +122,7 @@ my @oldDirs = (); my @files = $d->read; $d->close; foreach my $host ( @files ) { - next if ( $host eq "." || $host eq ".." || defined($Status{$host}) ); + next if ( $host =~ /^\./ || defined($Status{$host}) ); push(@oldDirs, "$TopDir/pc/$host"); } if ( @oldDirs ) { @@ -217,7 +217,7 @@ foreach my $host ( sort(keys(%Status)) ) { while ( 1 ) { my $s = $fh->readLine(); last if ( $s eq "" ); - if ( $s =~ /^\s*Error reading file.*\.pst : ERRDOS - ERRlock/ + if ( $s =~ /^\s*Error reading file.*\.pst : (ERRDOS - ERRlock|NT_STATUS_FILE_LOCK_CONFLICT)/ || $s =~ /^\s*Error reading file.*\.pst\. Got 0 bytes/ ) { $badOutlook = 1; last; diff --git a/bin/BackupPC_serverMesg b/bin/BackupPC_serverMesg index d5a8f55..a83ce30 100755 --- a/bin/BackupPC_serverMesg +++ b/bin/BackupPC_serverMesg @@ -43,7 +43,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -51,7 +51,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::FileZIO; diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index dce51dc..34f61fa 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -51,7 +51,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -59,7 +59,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use File::Path; use Getopt::Std; use BackupPC::Lib; @@ -227,9 +227,14 @@ sub archiveWrite # sub archiveWriteHardLinks { - my $fh = @_; + my($fh) = @_; foreach my $hdr ( @HardLinks ) { $hdr->{size} = 0; + my $name = $hdr->{linkname}; + $name =~ s{^\./}{/}; + if ( defined($HardLinkExtraFiles{$name}) ) { + $hdr->{linkname} = $HardLinkExtraFiles{$name}; + } if ( defined($PathRemove) && substr($hdr->{linkname}, 0, length($PathRemove)+1) eq ".$PathRemove" ) { @@ -474,10 +479,11 @@ sub TarWriteFile my $done = 0; my $name = $hdr->{linkname}; $name =~ s{^\./}{/}; - if ( $HardLinkExtraFiles{$name} ) { + if ( defined($HardLinkExtraFiles{$name}) ) { $done = 1; } else { foreach my $arg ( @ARGV ) { + $arg = "/" if ( $arg eq "." ); $arg =~ s{^\./+}{/}; $arg =~ s{/+$}{}; $done = 1 if ( $name eq $arg || $name =~ /^\Q$arg\// ); @@ -496,8 +502,10 @@ sub TarWriteFile # routine, so that we save the hassle of dealing with # mangling, merging and attributes. # - $HardLinkExtraFiles{$hdr->{linkname}} = 1; - archiveWrite($fh, $hdr->{linkname}, $hdr->{name}); + my $name = $hdr->{linkname}; + $name =~ s{^\./}{/}; + $HardLinkExtraFiles{$name} = $hdr->{name}; + archiveWrite($fh, $name, $hdr->{name}); } } elsif ( $hdr->{type} == BPC_FTYPE_SYMLINK ) { # diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract index eec7fc0..eb33006 100755 --- a/bin/BackupPC_tarExtract +++ b/bin/BackupPC_tarExtract @@ -27,7 +27,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -35,7 +35,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::Attrib qw(:all); use BackupPC::FileZIO; @@ -313,6 +313,7 @@ sub TarReadFile # my($nRead); #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n"); + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f); my $poolWrite = BackupPC::PoolWrite->new($bpc, "$OutDir/$ShareName/$f->{mangleName}", $f->{size}, $Compress); @@ -350,6 +351,7 @@ sub TarReadFile # a plain file. # $f->{size} = length($f->{linkname}); + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f); my $poolWrite = BackupPC::PoolWrite->new($bpc, "$OutDir/$ShareName/$f->{mangleName}", $f->{size}, $Compress); @@ -367,6 +369,7 @@ sub TarReadFile # contents. # $f->{size} = length($f->{linkname}); + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f); my $poolWrite = BackupPC::PoolWrite->new($bpc, "$OutDir/$ShareName/$f->{mangleName}", $f->{size}, $Compress); @@ -390,6 +393,7 @@ sub TarReadFile } else { $data = "$f->{devmajor},$f->{devminor}"; } + pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f); my $poolWrite = BackupPC::PoolWrite->new($bpc, "$OutDir/$ShareName/$f->{mangleName}", length($data), $Compress); @@ -478,6 +482,32 @@ sub logFileAction $name); } +# +# Create the parent directory of $file if necessary +# +sub pathCreate +{ + my($dir, $fullPath, $file, $f) = @_; + + # + # Get parent directory of each of $dir and $fullPath + # + $dir =~ s{/[^/]*$}{}; + $fullPath =~ s{/[^/]*$}{}; + return if ( -d $fullPath ); + mkpath($fullPath, 0, 0777); + $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress }) + if ( !defined($Attrib{$dir}) ); + $Attrib{$dir}->set($file, { + type => BPC_FTYPE_DIR, + mode => 0755, + uid => $f->{uid}, + gid => $f->{gid}, + size => 0, + mtime => 0, + }); +} + sub catch_signal { my $sigName = shift; diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index 69cde02..2380fb6 100755 --- a/bin/BackupPC_trashClean +++ b/bin/BackupPC_trashClean @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -37,7 +37,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) ); diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat index 9e21790..141e2a6 100755 --- a/bin/BackupPC_zcat +++ b/bin/BackupPC_zcat @@ -32,7 +32,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -41,7 +41,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use Compress::Zlib; use BackupPC::FileZIO; diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index bebea7a..88a5742 100755 --- a/bin/BackupPC_zipCreate +++ b/bin/BackupPC_zipCreate @@ -51,7 +51,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -59,7 +59,7 @@ use strict; no utf8; -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use Archive::Zip qw(:ERROR_CODES); use File::Path; use Getopt::Std; diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index dfb7fcd..e1df31e 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 2.1.0beta2, released 23 May 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -49,7 +49,7 @@ use strict; no utf8; use CGI; use CGI::Carp qw(fatalsToBrowser); -use lib "/usr/local/BackupPC/lib"; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; use BackupPC::CGI::Lib qw(:all); @@ -95,7 +95,7 @@ my $action = $ActionDispatch{$In{action}}; # the directory onto INC if it is missing. This is an ugly hack; # need to figure out what's really going on... # -my $installDir = '/usr/local/BackupPC/lib'; +my $installDir = '/usr/local/BackupPC2.1.0/lib'; push(@INC, $installDir) if ( !grep($_ eq $installDir, @INC) ); # diff --git a/conf/config.pl b/conf/config.pl index 55e1f3c..aafaa8c 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -741,7 +741,7 @@ $Conf{BackupZeroFilesIsFatal} = 1; # - 'rsync': backup and restore via rsync (via rsh or ssh). # Best choice for linux/unix. Good choice also for WinXX. # -# - 'rsyncd': backup and restre via rsync daemon on the client. +# - 'rsyncd': backup and restore via rsync daemon on the client. # Best choice for linux/unix if you have rsyncd running on # the client. Good choice also for WinXX. # @@ -1337,7 +1337,7 @@ $Conf{PingMaxMsec} = 20; # Despite the name, this parameter sets the timeout for all transport # methods (tar, smb etc). # -$Conf{ClientTimeout} = 7200; +$Conf{ClientTimeout} = 72000; # # Maximum number of log files we keep around in each PC's directory @@ -1510,7 +1510,7 @@ $Conf{EMailUserDestDomain} = ''; # To: $user$domain # cc: # Subject: $subj -# +# $headers # Dear $userName, # # This is a site-specific email message. @@ -1538,7 +1538,7 @@ $Conf{EMailNotifyOldBackupDays} = 7.0; # To: $user$domain # cc: # Subject: $subj -# +# $headers # Dear $userName, # # This is a site-specific email message. @@ -1566,7 +1566,7 @@ $Conf{EMailNotifyOldOutlookDays} = 5.0; # To: $user$domain # cc: # Subject: $subj -# +# $headers # Dear $userName, # # This is a site-specific email message. diff --git a/configure.pl b/configure.pl index dddb7d7..d9a1722 100755 --- a/configure.pl +++ b/configure.pl @@ -461,7 +461,7 @@ foreach my $dir ( qw(bin doc # Create CGI image directory # foreach my $dir ( ($Conf{CgiImageDir}) ) { - next if ( $dir eq "" || -d $dir ); + next if ( $dir eq "" || -d "$DestDir$dir" ); mkpath("$DestDir$dir", 0, 0775); if ( !-d "$DestDir$dir" || !chown($Uid, $Gid, "$DestDir$dir") ) { die("Failed to create or chown $DestDir$dir"); diff --git a/doc-src/BackupPC.pod b/doc-src/BackupPC.pod index 3b714e8..5b2a377 100644 --- a/doc-src/BackupPC.pod +++ b/doc-src/BackupPC.pod @@ -299,7 +299,7 @@ appreciated, both positive and negative. Beyond being a satisfied user and telling other people about it, everyone is encouraged to add links to L -(I'll see then via Google) or otherwise publicize BackupPC. Unlike +(I'll see them via Google) or otherwise publicize BackupPC. Unlike the commercial products in this space, I have a zero budget (in both time and money) for marketing, PR and advertising, so it's up to all of you! Feel free to vote for BackupPC at @@ -599,7 +599,7 @@ directory. =head2 Step 3: Setting up config.pl After running configure.pl, browse through the config file, -__INSTALLDIR__/conf/config.pl, and make sure all the default settings +__TOPDIR__/conf/config.pl, and make sure all the default settings are correct. In particular, you will need to decide whether to use smb, tar or rsync transport (or whether to set it on a per-PC basis) and set the relevant parameters for that transport method. @@ -925,7 +925,11 @@ of SSH you have by typing "ssh" or "man ssh".) =item Mac OS X In general this should be similar to Linux/Unix machines. -Mark Stosberg reports that you can also use hfstar. +Many users have reported success using xtar, which also +backs up the Mac OS X resource forks. + +Other choices include rsync and Mark Stosberg reports that you +can also use hfstar. See L. =item SSH Setup @@ -1983,7 +1987,10 @@ is only run when there are no BackupPC_dump or BackupPC_link processes running. Therefore, when it is time to run BackupPC_nightly, no new backups are started and BackupPC waits until all backups have finished. Then BackupPC_nightly is run, and until it finishes no new backups are -started. If BackupPC_nightly is slow, the settings +started. If BackupPC_nightly takes too long to run, the settings +$Conf{MaxBackupPCNightlyJobs} and $Conf{BackupPCNightlyPeriod} can +be used to run several BackupPC_nightly processes in parallel, and +to split its job over several nights. =back @@ -2728,7 +2735,7 @@ See L. =head1 Copyright -Copyright (C) 2001-2004 Craig Barratt +Copyright (C) 2001-2005 Craig Barratt =head1 Credits diff --git a/init.d/src/gentoo-backuppc b/init.d/src/gentoo-backuppc index 3df501e..98d3cf6 100755 --- a/init.d/src/gentoo-backuppc +++ b/init.d/src/gentoo-backuppc @@ -34,6 +34,7 @@ stop() { restart() { ebegin "Restarting BackupPC" svc_stop + sleep 1 svc_start eend $? "Failed to restart BackupPC" } diff --git a/lib/BackupPC/Attrib.pm b/lib/BackupPC/Attrib.pm index d48d85e..a5bbd6f 100644 --- a/lib/BackupPC/Attrib.pm +++ b/lib/BackupPC/Attrib.pm @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/AdminOptions.pm b/lib/BackupPC/CGI/AdminOptions.pm index 9663025..756d0e5 100644 --- a/lib/BackupPC/CGI/AdminOptions.pm +++ b/lib/BackupPC/CGI/AdminOptions.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Archive.pm b/lib/BackupPC/CGI/Archive.pm index d6e2408..0ecd751 100644 --- a/lib/BackupPC/CGI/Archive.pm +++ b/lib/BackupPC/CGI/Archive.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/ArchiveInfo.pm b/lib/BackupPC/CGI/ArchiveInfo.pm index 4f7b2c8..6db9153 100644 --- a/lib/BackupPC/CGI/ArchiveInfo.pm +++ b/lib/BackupPC/CGI/ArchiveInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Browse.pm b/lib/BackupPC/CGI/Browse.pm index e0c3346..942df16 100644 --- a/lib/BackupPC/CGI/Browse.pm +++ b/lib/BackupPC/CGI/Browse.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/DirHistory.pm b/lib/BackupPC/CGI/DirHistory.pm index 30162f0..0614bcb 100644 --- a/lib/BackupPC/CGI/DirHistory.pm +++ b/lib/BackupPC/CGI/DirHistory.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/EmailSummary.pm b/lib/BackupPC/CGI/EmailSummary.pm index 355c171..dd7d9f5 100644 --- a/lib/BackupPC/CGI/EmailSummary.pm +++ b/lib/BackupPC/CGI/EmailSummary.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/GeneralInfo.pm b/lib/BackupPC/CGI/GeneralInfo.pm index 6838d58..dbcfa02 100644 --- a/lib/BackupPC/CGI/GeneralInfo.pm +++ b/lib/BackupPC/CGI/GeneralInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/HostInfo.pm b/lib/BackupPC/CGI/HostInfo.pm index dbb53d7..4edd3d9 100644 --- a/lib/BackupPC/CGI/HostInfo.pm +++ b/lib/BackupPC/CGI/HostInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/LOGlist.pm b/lib/BackupPC/CGI/LOGlist.pm index 99e405c..6aa7355 100644 --- a/lib/BackupPC/CGI/LOGlist.pm +++ b/lib/BackupPC/CGI/LOGlist.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Lib.pm b/lib/BackupPC/CGI/Lib.pm index 9d89b0d..3345d99 100644 --- a/lib/BackupPC/CGI/Lib.pm +++ b/lib/BackupPC/CGI/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -289,6 +289,8 @@ sub GetStatusInfo { my($status) = @_; ServerConnect(); + %Status = () if ( $status =~ /\bhosts\b/ ); + %StatusHost = () if ( $status =~ /\bhost\(/ ); my $reply = $bpc->ServerMesg("status $status"); $reply = $1 if ( $reply =~ /(.*)/s ); eval($reply); @@ -459,7 +461,8 @@ EOF $Lang->{Last_bad_XferLOG_errors_only}, " class=\"navbar\""); } - if ( -f "$TopDir/pc/$host/config.pl" ) { + if ( -f "$TopDir/pc/$host/config.pl" + || ($host ne "config" && -f "$TopDir/conf/$host.pl") ) { NavLink("?action=view&type=config&host=${EscURI($host)}", $Lang->{Config_file}, " class=\"navbar\""); } @@ -509,7 +512,7 @@ EOF NavSectionTitle($Lang->{NavSectionTitle_}); foreach my $l ( @adminLinks ) { if ( $PrivAdmin || !$l->{priv} ) { - my $txt = defined($l->{lname}) ? $Lang->{$l->{lname}} : $l->{name}; + my $txt = $l->{lname} ne "" ? $Lang->{$l->{lname}} : $l->{name}; NavLink($l->{link}, $txt); } } diff --git a/lib/BackupPC/CGI/Queue.pm b/lib/BackupPC/CGI/Queue.pm index 8965ce6..e0826ea 100644 --- a/lib/BackupPC/CGI/Queue.pm +++ b/lib/BackupPC/CGI/Queue.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/ReloadServer.pm b/lib/BackupPC/CGI/ReloadServer.pm index 37c403d..89e3959 100644 --- a/lib/BackupPC/CGI/ReloadServer.pm +++ b/lib/BackupPC/CGI/ReloadServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm index 8079d91..1beb089 100644 --- a/lib/BackupPC/CGI/Restore.pm +++ b/lib/BackupPC/CGI/Restore.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/RestoreFile.pm b/lib/BackupPC/CGI/RestoreFile.pm index 3188c1f..9e347f8 100644 --- a/lib/BackupPC/CGI/RestoreFile.pm +++ b/lib/BackupPC/CGI/RestoreFile.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -150,7 +150,7 @@ sub restoreFile my $view = BackupPC::View->new($bpc, $host, \@Backups); my $a = $view->fileAttrib($num, $share, $dir); if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) { - ErrorExit("Can't restore bad file ${EscHTML($dir)}"); + ErrorExit("Can't restore bad file ${EscHTML($dir)} ($num, $share, $dir)"); } my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress}); my $data; @@ -164,7 +164,6 @@ sub restoreFile } $f->close; $linkName =~ s/^\.\///; - my $share = $1 if ( $dir =~ /^\/?(.*?)\// ); restoreFile($host, $num, $share, $linkName, 1, $dir); return; } diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm index 733956e..5d315de 100644 --- a/lib/BackupPC/CGI/RestoreInfo.pm +++ b/lib/BackupPC/CGI/RestoreInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/StartServer.pm b/lib/BackupPC/CGI/StartServer.pm index 0906cb7..225b3e8 100644 --- a/lib/BackupPC/CGI/StartServer.pm +++ b/lib/BackupPC/CGI/StartServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/StartStopBackup.pm b/lib/BackupPC/CGI/StartStopBackup.pm index e852c99..b1031ef 100644 --- a/lib/BackupPC/CGI/StartStopBackup.pm +++ b/lib/BackupPC/CGI/StartStopBackup.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/StopServer.pm b/lib/BackupPC/CGI/StopServer.pm index 2c3bc36..22b8e8f 100644 --- a/lib/BackupPC/CGI/StopServer.pm +++ b/lib/BackupPC/CGI/StopServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Summary.pm b/lib/BackupPC/CGI/Summary.pm index 71bbdeb..dfafa06 100644 --- a/lib/BackupPC/CGI/Summary.pm +++ b/lib/BackupPC/CGI/Summary.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm index f6cc637..ce09259 100644 --- a/lib/BackupPC/CGI/View.pm +++ b/lib/BackupPC/CGI/View.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm index dc6e480..9218faa 100644 --- a/lib/BackupPC/FileZIO.pm +++ b/lib/BackupPC/FileZIO.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Lang/fr.pm b/lib/BackupPC/Lang/fr.pm index 9109390..2111f10 100644 --- a/lib/BackupPC/Lang/fr.pm +++ b/lib/BackupPC/Lang/fr.pm @@ -17,7 +17,7 @@ $Lang{Type_incr} = "incr # ----- -$Lang{Only_privileged_users_can_view_admin_options} = "Seulement les usagers ayant les privilèges appropriés peuvent voir les options d'administration."; +$Lang{Only_privileged_users_can_view_admin_options} = "Seuls les utilisateurs privilégiés peuvent voir les options d'administration."; $Lang{H_Admin_Options} = "BackupPC: Options d'administration"; $Lang{Admin_Options} = "Options d'administration"; $Lang{Admin_Options_Page} = < EOF $Lang{Unable_to_connect_to_BackupPC_server} = "Impossible de se connecter au serveur BackupPC", - "Ce script CGI (\$MyURL) est incapable de se connecter au serverur BackupPC" + "Ce script CGI (\$MyURL) est incapable de se connecter au serveur BackupPC" . " sur \$Conf{ServerHost} au port \$Conf{ServerPort}. L'erreur" . " est: \$err." . " Il est possible que le serveur BackupPC ne roule pas ou qu'il y a une erreur " @@ -142,7 +142,7 @@ Il y a \$hostCntGood h Nb complètes Complètes Âge/Jours Complètes Taille/Go - Vitesse Mo/sec + Vitesse Mo/s Nb incrémentielles Incrémentielles Âge/Jours État actuel @@ -160,7 +160,7 @@ Il y a \$hostCntNone h Nb complètes Complètes Âge/jour Complètes Taille/Go - Vitesse Mo/sec + Vitesse Mo/s Nb incrémentielles Incrémentielles Âge/jours État actuel @@ -207,7 +207,7 @@ Il y a \$hostCntGood h - + \$strGood \$checkAllHosts @@ -273,7 +273,7 @@ EOF # ----------------------------------- $Lang{Pool_Stat} = <La mise en commun est constituée de \$info->{"\${name}FileCnt"} fichiers - et \$info->{"\${name}DirCnt"} repertoires représentant \${poolSize} Go (depuis le \$poolTime), + et \$info->{"\${name}DirCnt"} répertoires représentant \${poolSize} Go (depuis le \$poolTime),
  • Le hachage de mise en commun des fichiers donne \$info->{"\${name}FileCntRep"} fichiers répétés avec comme plus longue chaîne \$info->{"\${name}FileRepMax"},
  • Le nettoyage nocturne a effacé \$info->{"\${name}FileCntRm"} fichiers, soit @@ -286,7 +286,7 @@ $Lang{BackupPC__Backup_Requested_on__host} = "BackupPC: Sauvegarde demand $Lang{REPLY_FROM_SERVER} = < -La réponse du serveur a été: \$reply +La réponse du serveur a été : \$reply

    Retourner à la page d\'accueil de \$host. EOF @@ -332,7 +332,7 @@ EOF # -------------------------------- $Lang{Only_privileged_users_can_view_queues_} = "Seuls les utilisateurs privilégiés peuvent voir les files."; # -------------------------------- -$Lang{Only_privileged_users_can_archive} = "(ENSLIGH) Only privileged users can Archive."; +$Lang{Only_privileged_users_can_archive} = "Seuls les utilisateurs privilégiés peuvent archiver."; # -------------------------------- $Lang{BackupPC__Queue_Summary} = "BackupPC: Résumé de la file"; # -------------------------------- @@ -406,7 +406,7 @@ EOF # ------------------------------- $Lang{Recent_Email_Summary} = <

  • Host Usager Utilisateur Taille
    @@ -426,13 +426,13 @@ $Lang{Restore_Options_for__host} = "BackupPC: Options de restauration sur \$host $Lang{Restore_Options_for__host2} = < -Vous avez sélectionné les fichiers/repertoires suivants depuis +Vous avez sélectionné les fichiers/répertoires suivants depuis le partage \$share, sauvegarde numéro \$num:
      \$fileListStr

    -Vous avez trois choix pour restaurer ces fichiers/repertoires. +Vous avez trois choix pour restaurer ces fichiers/répertoires. Veuillez sélectionner une des options suivantes.

    \${h2("Option 1: Restauration directe")} @@ -591,7 +591,7 @@ $Lang{Restore_Requested_on__hostDest} = "BackupPC: Restauration demand $Lang{Reply_from_server_was___reply} = < -La réponse du serveur est: \$reply +La réponse du serveur est : \$reply

    Retourner à la page d\'accueil de \$hostDest . EOF @@ -599,7 +599,7 @@ EOF $Lang{BackupPC_Archive_Reply_from_server} = < -La réponse du serveur est: \$reply +La réponse du serveur est : \$reply EOF @@ -632,7 +632,7 @@ Cliquer sur le num

    - + @@ -662,7 +662,7 @@ Cliquer sur le num

    Les fichiers existants sont ceux qui sont déjà sur le serveur; Les nouveaux fichiers sont ceux qui ont été ajoutés au serveur. -Les fichiers vides et les erreurs de SMB ne sont pas comptabilisés parmis les nouveaux et les réutilisés. +Les fichiers vides et les erreurs de SMB ne sont pas comptabilisés parmi les nouveaux et les réutilisés.

    Destinataire Type Fusionnée Date de démarrage Durée/mins Durée/min Âge/jours Chemin d\'accès de la sauvegarde sur le serveur
    @@ -675,7 +675,7 @@ Les fichiers vides et les erreurs de SMB ne sont pas comptabilis - + @@ -712,7 +712,7 @@ EOF $Lang{Host__host_Archive_Summary} = "BackupPC: Résumé de l'archivage pour l'hôte \$host"; $Lang{Host__host_Archive_Summary2} = < \$warnStr
      @@ -834,7 +834,7 @@ $Lang{DirHistory_fileLink} = "v"; $Lang{DirHistory_for__host} = < -Cette page montre chaque version des fichiers parmis toutes sauvegardes: +Cette page montre chaque version des fichiers parmi toutes sauvegardes:
      • Cliquez sur un numéro de sauvegarde pour revenir à la navigation de sauvegarde,
      • Cliquez sur un répertoire (\$Lang->{DirHistory_dirLink}) pour naviguer @@ -846,7 +846,7 @@ Cette page montre chaque version des fichiers parmis toutes sauvegardes:
      • Les fichiers qui ne sont pas présents sur une sauvegarde en particulier sont représentés par une boite vide.
      • Les fichiers montrés avec la même version peuvent avoir des attributs différents. - Choissisez le numéro de sauvegarde pour voir les attributs de fichiers. + Choisissez le numéro de sauvegarde pour voir les attributs de fichiers.
      \${h2("Historique de \${EscHTML(\$dirDisplay)}")} @@ -860,10 +860,10 @@ Cette page montre chaque version des fichiers parmis toutes sauvegardes: EOF # ------------------------------ -$Lang{Restore___num_details_for__host} = "BackupPC: Détails de la restauration n° \$num pour \$host"; +$Lang{Restore___num_details_for__host} = "BackupPC: Détails de la restauration n°\$num pour \$host"; $Lang{Restore___num_details_for__host2} = <
    Type Nb de Fichiers Taille/Mo Mo/sec Mo/s Nb de Fichiers Taille/Mo Nb de Fichiers
    @@ -880,7 +880,7 @@ $Lang{Restore___num_details_for__host2} = < - +
    Numéro \$Restores[\$i]{num}
    Durée \$duration min
    Nombre de fichier \$Restores[\$i]{nFiles}
    Grosseur totale \${MB} Mo
    Taux de transfert \$MBperSec Mo/sec
    Taux de transfert \$MBperSec Mo/s
    Erreurs de TarCreate \$Restores[\$i]{tarCreateErrs}
    Erreurs de transfert \$Restores[\$i]{xferErrs}
    Journal de transfert @@ -898,10 +898,10 @@ $Lang{Restore___num_details_for__host2} = < @@ -970,11 +970,11 @@ $Lang{Empty_host_name} = "Nom d\'h $Lang{Unknown_host_or_user} = "\${EscHTML(\$host)}, hôte ou utilisateur inconnu."; $Lang{Only_privileged_users_can_view_information_about} = "Seuls les utilisateurs privilégiés peuvent accéder aux " . " informations sur l\'hôte \${EscHTML(\$host)}." ; -$Lang{Only_privileged_users_can_view_archive_information} = "Seuls les usagers ayant les privilèges nécessaires peuvent voir les informations d'archivage."; +$Lang{Only_privileged_users_can_view_archive_information} = "Seuls les utilisateurs privilégiés peuvent voir les informations d'archivage."; $Lang{Only_privileged_users_can_view_restore_information} = "Seuls les utilisateurs privilégiés peuvent restaurer des informations."; $Lang{Restore_number__num_for_host__does_not_exist} = "Restauration numéro \$num de l\'hôte \${EscHTML(\$host)} n\'existe pas"; -$Lang{Archive_number__num_for_host__does_not_exist} = "L'archive no \$num pour l'hôte \${EscHTML(\$host)} n'existe pas."; +$Lang{Archive_number__num_for_host__does_not_exist} = "L'archive n°\$num pour l'hôte \${EscHTML(\$host)} n'existe pas."; $Lang{Can_t_find_IP_address_for} = "Ne peut pas trouver d\'adresse IP pour \${EscHTML(\$host)}"; $Lang{host_is_a_DHCP_host} = <Dernier email envoyé à \${UserLink(\$user)} le \$mailTime, avait comme sujet "\$subj". +
  • Dernier courriel envoyé à \${UserLink(\$user)} le \$mailTime, avait comme sujet "\$subj". EOF # ------------ $Lang{The_command_cmd_is_currently_running_for_started} = <Les pings vers \$host ont échoués \$StatusHost{deadCnt} fois consécutives. +
  • Les pings vers \$host ont échoué \$StatusHost{deadCnt} fois consécutives. EOF # ----- @@ -1137,7 +1137,7 @@ Cliquer sur le num
  • - + @@ -1169,7 +1169,7 @@ $Lang{No} = "non"; $Lang{Yes} = "oui"; $Lang{The_directory_is_empty} = < EOF @@ -1189,8 +1189,8 @@ $Lang{and} = "et"; $Lang{Status_idle} = "inactif"; $Lang{Status_backup_starting} = "début de la sauvegarde"; $Lang{Status_backup_in_progress} = "sauvegarde en cours"; -$Lang{Status_restore_starting} = "début de la restoration"; -$Lang{Status_restore_in_progress} = "restoration en cours"; +$Lang{Status_restore_starting} = "début de la restauration"; +$Lang{Status_restore_in_progress} = "restauration en cours"; $Lang{Status_link_pending} = "en attente de l'édition de liens"; $Lang{Status_link_running} = "édition de liens en cours"; @@ -1220,7 +1220,7 @@ $userName, Notre logiciel de copies de sécurité n'a jamais réussi à prendre de sauvegarde de votre ordinateur ($host). Les sauvegardes -devraient normallement survenir lorsque votre ordinateur est connecté +devraient normalement survenir lorsque votre ordinateur est connecté au réseau. Vous devriez contacter le support informatique si: - Votre ordinateur est régulièrement connecté au réseau, ce qui @@ -1235,7 +1235,7 @@ Autrement, veuillez vous assurer que votre ordinateur est connect au réseau lorsque ce sera possible. Merci de votre attention, -BackupPC Genie +BackupPC Génie http://backuppc.sourceforge.net EOF @@ -1250,7 +1250,7 @@ $userName, Aucune sauvegarde de votre ordinateur n'a été effectuée depuis $days jours. $numBackups sauvegardes ont étés effectuées du $firstTime -jusqu'il y à $days jours. Les sauvegardes devraient normallement +jusqu'il y à $days jours. Les sauvegardes devraient normalement survenir lorsque votre ordinateur est connecté au réseau. Si votre ordinateur a été connecté au réseau plus de quelques heures @@ -1265,12 +1265,12 @@ les fichiers attach avec votre ordinateur. Merci de votre attention, -BackupPC Genie +BackupPC Génie http://backuppc.sourceforge.net EOF # Old Outlook files -$Lang{EMailOutlookBackupSubj} = "BackupPC: Les fichiers de Outlook sur \$host doivent êtes sauvegardés"; +$Lang{EMailOutlookBackupSubj} = "BackupPC: Les fichiers de Outlook sur \$host doivent être sauvegardés"; $Lang{EMailOutlookBackupMesg} = <<'EOF'; To: $user$domain cc: @@ -1284,7 +1284,7 @@ calendriers. $numBackups sauvegardes ont au $lastTime. Par contre, Outlook bloque ses fichiers lorsqu'il est ouvert, ce qui empêche de les sauvegarder. -Il est recommendé d'effectuer une sauvegarde de vos fichiers Outlook +Il est recommandé d'effectuer une sauvegarde de vos fichiers Outlook quand vous serez connecté au réseau en quittant Outlook et tout autre application, et en visitant ce lien avec votre fureteur web: @@ -1297,7 +1297,7 @@ fureteur avec de v sauvegarde devrait prendre quelques minutes à s'effectuer. Merci de votre attention, -BackupPC Genie +BackupPC Génie http://backuppc.sourceforge.net EOF diff --git a/lib/BackupPC/Lang/it.pm b/lib/BackupPC/Lang/it.pm index 9dd6128..f7e753d 100644 --- a/lib/BackupPC/Lang/it.pm +++ b/lib/BackupPC/Lang/it.pm @@ -1,6 +1,6 @@ #!/bin/perl # -# $Id: it.pm,v 1.9 2004/06/20 02:21:02 cbarratt Exp $ +# $Id: it.pm,v 1.9.2.1 2005/09/06 04:52:10 cbarratt Exp $ # # Italian i18n file # @@ -1259,7 +1259,7 @@ Subject: $subj Ciao $userName, -e` stato effettuato correttamente il backup del tuo PC ($host) per +non e` stato effettuato correttamente il backup del tuo PC ($host) per $days giorni. Dal $firstTime fino a $days fa sono stati eseguiti con successo $numBackups backup. I backup dei PC dovrebbero avvenire automaticamente quando il tuo PC e` connesso alla rete. diff --git a/lib/BackupPC/Lang/nl.pm b/lib/BackupPC/Lang/nl.pm index 93f92bb..e4f47b2 100644 --- a/lib/BackupPC/Lang/nl.pm +++ b/lib/BackupPC/Lang/nl.pm @@ -274,8 +274,7 @@ EOF $Lang{Pool_Stat} = <Gebruikte backupschijfruimte is \${poolSize}GB groot en bevat \$info->{"\${name}FileCnt"} bestanden en \$info->{"\${name}DirCnt"} mappen (op \$poolTime), -
  • Schijfruimte bevat \$info->{"\${name}FileCntRep"} identieke - bestanden (langste reeks is \$info->{"\${name}FileRepMax"}, +
  • Schijfruimte bevat \$info->{"\${name}FileCntRep"} bestanden met identieke hashcodes (langste reeks is \$info->{"\${name}FileRepMax"},
  • Nachtelijke opruiming verwijderde \$info->{"\${name}FileCntRm"} bestanden met een grootte van \${poolRmSize}GB (ongeveer \$poolTime), EOF diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 5ad2770..ae5bd3c 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -56,10 +56,10 @@ sub new my($topDir, $installDir, $noUserCheck) = @_; my $bpc = bless { - TopDir => $topDir || '/data/BackupPC', - BinDir => $installDir || '/usr/local/BackupPC', - LibDir => $installDir || '/usr/local/BackupPC', - Version => '2.1.0', + TopDir => $topDir || '/data/BackupPC2.1.0', + BinDir => $installDir || '/usr/local/BackupPC2.1.0', + LibDir => $installDir || '/usr/local/BackupPC2.1.0', + Version => '2.1.2', BackupFields => [qw( num type startTime endTime nFiles size nFilesExist sizeExist nFilesNew sizeNew diff --git a/lib/BackupPC/PoolWrite.pm b/lib/BackupPC/PoolWrite.pm index d0be0e6..e6537a5 100644 --- a/lib/BackupPC/PoolWrite.pm +++ b/lib/BackupPC/PoolWrite.pm @@ -56,7 +56,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/View.pm b/lib/BackupPC/View.pm index 66de030..165b762 100644 --- a/lib/BackupPC/View.pm +++ b/lib/BackupPC/View.pm @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -192,13 +192,14 @@ sub dirCache } } } - $m->{files}{$fileUM}{relPath} = "$dir/$fileUM"; - $m->{files}{$fileUM}{sharePathM} = "$sharePathM/$file"; - $m->{files}{$fileUM}{fullPath} = "$path/$file"; - $m->{files}{$fileUM}{backupNum} = $backupNum; - $m->{files}{$fileUM}{compress} = $compress; - $m->{files}{$fileUM}{nlink} = $s[3]; - $m->{files}{$fileUM}{inode} = $s[1]; + ($m->{files}{$fileUM}{relPath} = "$dir/$fileUM") =~ s{//+}{/}g; + ($m->{files}{$fileUM}{sharePathM} = "$sharePathM/$file") + =~ s{//+}{/}g; + ($m->{files}{$fileUM}{fullPath} = "$path/$file") =~ s{//+}{/}g; + $m->{files}{$fileUM}{backupNum} = $backupNum; + $m->{files}{$fileUM}{compress} = $compress; + $m->{files}{$fileUM}{nlink} = $s[3]; + $m->{files}{$fileUM}{inode} = $s[1]; } # # Also include deleted files @@ -444,13 +445,14 @@ sub dirHistory } } } - $files->{$fileUM}[$i]{relPath} = "$dir/$fileUM"; - $files->{$fileUM}[$i]{sharePathM} = "$sharePathM/$file"; - $files->{$fileUM}[$i]{fullPath} = "$path/$file"; - $files->{$fileUM}[$i]{backupNum} = $backupNum; - $files->{$fileUM}[$i]{compress} = $compress; - $files->{$fileUM}[$i]{nlink} = $s[3]; - $files->{$fileUM}[$i]{inode} = $s[1]; + ($files->{$fileUM}[$i]{relPath} = "$dir/$fileUM") =~ s{//+}{/}g; + ($files->{$fileUM}[$i]{sharePathM} = "$sharePathM/$file") + =~ s{//+}{/}g; + ($files->{$fileUM}[$i]{fullPath} = "$path/$file") =~ s{//+}{/}g; + $files->{$fileUM}[$i]{backupNum} = $backupNum; + $files->{$fileUM}[$i]{compress} = $compress; + $files->{$fileUM}[$i]{nlink} = $s[3]; + $files->{$fileUM}[$i]{inode} = $s[1]; } # diff --git a/lib/BackupPC/Xfer/Archive.pm b/lib/BackupPC/Xfer/Archive.pm index 1186b97..08e8f88 100644 --- a/lib/BackupPC/Xfer/Archive.pm +++ b/lib/BackupPC/Xfer/Archive.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index 9612cab..2ea58a5 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -55,9 +55,10 @@ BEGIN { # # Note: also update configure.pl when this version number is changed! # - if ( $File::RsyncP::VERSION < 0.51 ) { + if ( $File::RsyncP::VERSION < 0.52 ) { $RsyncLibOK = 0; - $RsyncLibErr = "File::RsyncP module version too old: need 0.50"; + $RsyncLibErr = "File::RsyncP module version" + . " ($File::RsyncP::VERSION) too old: need 0.52"; } else { $RsyncLibOK = 1; } diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm index b41aec4..58d53c5 100644 --- a/lib/BackupPC/Xfer/RsyncDigest.pm +++ b/lib/BackupPC/Xfer/RsyncDigest.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index 26ba1bd..f4853bb 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -12,7 +12,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/Smb.pm b/lib/BackupPC/Xfer/Smb.pm index 8a9ba26..51ae10c 100644 --- a/lib/BackupPC/Xfer/Smb.pm +++ b/lib/BackupPC/Xfer/Smb.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/Tar.pm b/lib/BackupPC/Xfer/Tar.pm index bc4f787..b082bab 100644 --- a/lib/BackupPC/Xfer/Tar.pm +++ b/lib/BackupPC/Xfer/Tar.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Zip/FileMember.pm b/lib/BackupPC/Zip/FileMember.pm index d9f47a9..efb2f22 100644 --- a/lib/BackupPC/Zip/FileMember.pm +++ b/lib/BackupPC/Zip/FileMember.pm @@ -33,7 +33,7 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # diff --git a/makeDist b/makeDist index bd17758..058e8f0 100755 --- a/makeDist +++ b/makeDist @@ -42,8 +42,8 @@ use Getopt::Std; umask(0022); -my $Version = "2.1.0pl1"; -my $ReleaseDate = "15 Aug 2004"; +my $Version = "2.1.2"; +my $ReleaseDate = "5 Sep 2005"; my $DistDir = "dist/BackupPC-$Version"; my @PerlSrc = qw( @@ -258,7 +258,7 @@ sub InstallFile } if ( /__CONFIGPOD__/ ) { print OUT $ConfPod; - } elsif ( /^use lib ".*BackupPC\/lib";/ + } elsif ( /^use lib ".*BackupPC[\d.]*\/lib";/ || /^use lib "\/home\/pcbackup\/install\/lib";/ ) { print OUT "use lib \"__INSTALLDIR__/lib\";\n"; } elsif ( $file =~ /Lib.pm/ && /(.*TopDir *=> .*)'.*',/ ) { diff --git a/makePatch b/makePatch index 4743f0a..a05a01f 100755 --- a/makePatch +++ b/makePatch @@ -8,7 +8,7 @@ use strict; use File::Find; use File::Path; -my $BaseVersion = "2.1.0beta2"; +my $BaseVersion = "2.1.1"; my $PatchLevel = "pl1"; my $PatchVersion = "$BaseVersion$PatchLevel"; @@ -74,7 +74,7 @@ sub CopyFile open(OUT, ">", "$TmpDir/$file") || die("Can't open $TmpDir/$file for output\n"); while ( ) { - if ( /^use lib ".*BackupPC\/lib";/ + if ( /^use lib ".*BackupPC[\d.]*\/lib";/ || /^use lib "\/home\/pcbackup\/install\/lib";/ ) { print OUT "use lib \"__INSTALLDIR__/lib\";\n"; } elsif ( $file =~ /Lib.pm/ && /(.*TopDir *=> .*)'.*',/ ) { -- 2.20.1
  • Numéro \$Archives[\$i]{num}
    Sauvegarde n° Résultat Date de départ Durée/mins Durée/min Nb fichiers Mo Nb errs tar Le repertoire \${EscHTML(\$dirDisplay)} est vide +
    Le répertoire \${EscHTML(\$dirDisplay)} est vide