From e7980c5813b6eecff28d48961943a7897ef49615 Mon Sep 17 00:00:00 2001 From: dpavlin Date: Mon, 30 Jan 2006 13:37:17 +0000 Subject: [PATCH] r9152@llin: dpavlin | 2006-01-30 14:11:45 +0100 update to upstream 2.1.2 git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@316 8392b6e1-25fa-0310-8288-cc32f8e212ea --- BUGS | 2 +- ChangeLog | 110 +++++++++++++++++++++++++++- README | 8 +- bin/BackupPC | 42 ++++++++++- bin/BackupPC_archive | 7 +- bin/BackupPC_archiveHost | 4 +- bin/BackupPC_compressPool | 2 +- bin/BackupPC_dump | 20 +++-- bin/BackupPC_link | 2 +- bin/BackupPC_nightly | 5 +- bin/BackupPC_restore | 7 +- bin/BackupPC_sendEmail | 9 ++- bin/BackupPC_serverMesg | 2 +- bin/BackupPC_tarCreate | 36 +++++++-- bin/BackupPC_tarExtract | 32 +++++++- bin/BackupPC_trashClean | 2 +- bin/BackupPC_zcat | 2 +- bin/BackupPC_zipCreate | 2 +- cgi-bin/BackupPC_Admin | 2 +- conf/BackupPC_stnd.css | 2 +- conf/config.pl | 10 +-- configure.pl | 10 +-- doc/BackupPC.html | 73 +++++++++--------- doc/BackupPC.pod | 56 +++++++------- init.d/src/debian-backuppc | 2 +- init.d/src/gentoo-backuppc | 3 +- init.d/src/linux-backuppc | 2 +- init.d/src/solaris-backuppc | 2 +- init.d/src/suse-backuppc | 2 +- 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 | 24 ++++-- 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 | 68 ++++++++--------- lib/BackupPC/Lang/it.pm | 2 +- lib/BackupPC/Lang/nl.pm | 9 +-- lib/BackupPC/Lib.pm | 4 +- lib/BackupPC/PoolWrite.pm | 2 +- lib/BackupPC/View.pm | 16 ++-- lib/BackupPC/Xfer/Archive.pm | 2 +- lib/BackupPC/Xfer/Rsync.pm | 7 +- lib/BackupPC/Xfer/RsyncDigest.pm | 2 +- lib/BackupPC/Xfer/RsyncFileIO.pm | 13 +++- lib/BackupPC/Xfer/Smb.pm | 4 +- lib/BackupPC/Xfer/Tar.pm | 2 +- lib/BackupPC/Zip/FileMember.pm | 2 +- 64 files changed, 455 insertions(+), 205 deletions(-) diff --git a/BUGS b/BUGS index 314af72..990f2c7 100644 --- a/BUGS +++ b/BUGS @@ -8,7 +8,7 @@ + user HyperEstraier node API for creation + use Search::Estraier pure perl module - use pgest from PostgreSQL for queries to HyperEstraier (through node API) -- update to upstream BackupPC 2.1.2 ++ update to upstream BackupPC 2.1.2 - check for invalid dates in input form + DVD burning - rename misnamed files all over our code to items (because those then to be files OR dirs) diff --git a/ChangeLog b/ChangeLog index e664e6a..498b7d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,12 +11,120 @@ # #======================================================================== # -# Version 2.1.0, released 20 Jun 2004. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # #======================================================================== +#------------------------------------------------------------------------ +# Version 2.1.2, 5 Sep 2005 +#------------------------------------------------------------------------ + +* 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. + +* Added patch from Tony Nelson to remove $Info{pid} before BackupPC + writes the status and shuts down. + +* Changed BackupPC_nightly so that it doesn't call find() if the + directory doesn't exist. This avoids errors in certain versions + of perl. Reported by Bernd Rilling. + +* Fixed BackupPC::CGI::Lib to correctly re-load config.pl for mod_perl. + Reported by Tony Nelson and Jimmy Liang. + +* Explicitly untaint $In{host} in BackupPC::CGI::Lib to fix problem + reported by Thomas Tempé. + +* Added newline to "...skipping because of user requested delay..." + log message in BackupPC_dump. Reported by Wayne Scott. + +* Added read file size error checking to BackupPC_tarCreate. + Reported by Brandon Evans. + +* Added check in BackupPC::Xfer::RsyncFileIO to ensure that when + compression is toggled on/off, a compressed backup doesn't link + to an uncompressed pool file (and an uncompressed backup doesn't + link to a compressed pool file). Reported by Brandon Evans. + +* Updated documentation with new dirvish URL and a typo from + Todd Curry. + +* Fix to BackupPC_sendEmail so that it correctly sends admin emails + for hosts that have failed backups. Reported by Simon Kuhn. + #------------------------------------------------------------------------ # Version 2.1.0, 20 Jun 2004 #------------------------------------------------------------------------ diff --git a/README b/README index 800ba69..b1bc981 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ BackupPC - Version 2.1.0 + Version 2.1.2 - 20 Jun 2004 + 5 Sep 2005 Copyright (C) 2001-2003 Craig Barratt. All rights reserved. @@ -28,8 +28,8 @@ plus rsync 2.5.6 on the client machines. To install BackupPC run these commands as root: - tar zxf BackupPC-2.1.0.tar.gz - cd BackupPC-2.1.0 + tar zxf BackupPC-2.1.2.tar.gz + cd BackupPC-2.1.2 perl configure.pl This will automatically determine some system information and prompt you diff --git a/bin/BackupPC b/bin/BackupPC index f3afaeb..1b2b057 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. # @@ -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 @@ -1806,6 +1839,7 @@ sub ServerShutdown } %Jobs = (); } + delete($Info{pid}); StatusWrite(); unlink("$TopDir/log/BackupPC.pid"); exit(1); diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive index 9efc662..c0b6030 100755 --- 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. # @@ -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 69cf5a7..7b53cc3 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. # @@ -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 5ed0a14..b96fb1d 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. # diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index d170f09..40401d9 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. # @@ -348,7 +348,7 @@ if ( !$opts{i} && !$opts{f} && $Conf{BlackoutGoodCnt} >= 0 } if ( !$opts{i} && !$opts{f} && $StatusHost{backoffTime} > time ) { - printf(LOG "%sskipping because of user requested delay (%.1f hours left)", + printf(LOG "%sskipping because of user requested delay (%.1f hours left)\n", $bpc->timeStamp, ($StatusHost{backoffTime} - time) / 3600); NothingToDo($needLink); } @@ -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 a1530c7..ea39bc2 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. # diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly index ff0825c..bd6c5ef 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. # @@ -148,7 +148,8 @@ for my $pool ( qw(pool cpool) ) { $fileLinkMax = 0; $fileCntRename = 0; %FixList = (); - find({wanted => \&GetPoolStats}, "$TopDir/$pool/$dir"); + find({wanted => \&GetPoolStats}, "$TopDir/$pool/$dir") + if ( -d "$TopDir/$pool/$dir" ); my $kb = $blkCnt / 2; my $kbRm = $blkCntRm / 2; my $kb2 = $blkCnt2 / 2; diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore index bb92268..96557ab 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. # @@ -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 190f346..82eb59a 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. # @@ -82,7 +82,8 @@ my $mesg = ""; my @badHosts = (); foreach my $host ( sort(keys(%Status)) ) { - next if ( $Status{$host}{reason} ne "backup failed" + next if ( ($Status{$host}{reason} ne "Reason_backup_failed" + && $Status{$host}{reason} ne "Reason_restore_failed") || $Status{$host}{error} =~ /^lost network connection to host/ ); push(@badHosts, "$host ($Status{$host}{error})"); } @@ -121,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 ) { @@ -216,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 5e58802..052b807 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. # diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index 701dd91..d973079 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. # @@ -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" ) { @@ -423,10 +428,28 @@ sub TarWriteFile TarWriteFileInfo($fh, $hdr); my($data, $size); while ( $f->read(\$data, $BufSize) > 0 ) { + if ( $size + length($data) > $hdr->{size} ) { + print(STDERR "Error: truncating $hdr->{fullPath} to" + . " $hdr->{size} bytes\n"); + $data = substr($data, 0, $hdr->{size} - $size); + $ErrorCnt++; + } TarWrite($fh, \$data); $size += length($data); } $f->close; + if ( $size != $hdr->{size} ) { + print(STDERR "Error: padding $hdr->{fullPath} to $hdr->{size}" + . " bytes from $size bytes\n"); + $ErrorCnt++; + while ( $size < $hdr->{size} ) { + my $len = $hdr->{size} - $size; + $len = $BufSize if ( $len > $BufSize ); + $data = "\0" x $len; + TarWrite($fh, \$data); + $size += $len; + } + } TarWritePad($fh, $size); $FileCnt++; $ByteCnt += $size; @@ -456,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\// ); @@ -478,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 35a43f6..e6a855a 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. # @@ -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 9867d22..ddb42c2 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. # diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat index 309184f..08644be 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. # diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index dcbe09a..1ab485d 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. # diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index bb292db..955a621 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -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. # diff --git a/conf/BackupPC_stnd.css b/conf/BackupPC_stnd.css index 8afb8ca..84ae47d 100644 --- a/conf/BackupPC_stnd.css +++ b/conf/BackupPC_stnd.css @@ -1,7 +1,7 @@ /* * BackupPC standard CSS definitions * - * Version 2.1.0, released 20 Jun 2004. + * Version 2.1.2, released 5 Sep 2005. * * See http://backuppc.sourceforge.net. * diff --git a/conf/config.pl b/conf/config.pl index b7f9990..36c9531 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 e4a02d6..03ac21f 100755 --- a/configure.pl +++ b/configure.pl @@ -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. # @@ -58,7 +58,7 @@ BackupPC cannot find the package $pkg, which is included in the BackupPC distribution. This probably means you did not cd to the unpacked BackupPC distribution before running configure.pl, eg: - cd BackupPC-2.1.0 + cd BackupPC-2.1.2 ./configure.pl Please try again. @@ -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"); @@ -550,7 +550,7 @@ if ( $Conf{CgiImageDir} ne "" ) { # # Install new CSS file, making a backup copy if necessary # - my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-2.1.0"; + my $cssBackup = "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css.pre-2.1.2"; if ( -f "$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) { rename("$DestDir$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup); } @@ -697,7 +697,7 @@ if ( defined($Conf{SmbClientTimeout}) ) { delete($Conf{SmbClientTimeout}); } -my $confCopy = "$dest.pre-2.1.0"; +my $confCopy = "$dest.pre-2.1.2"; if ( -f $dest && !-f $confCopy ) { # # Make copy of config file, preserving ownership and modes diff --git a/doc/BackupPC.html b/doc/BackupPC.html index 0a33601..f1b1a2d 100644 --- a/doc/BackupPC.html +++ b/doc/BackupPC.html @@ -2,7 +2,7 @@ BackupPC - + @@ -104,8 +104,8 @@

BackupPC Introduction

-

This documentation describes BackupPC version 2.1.0, -released on 20 Jun 2004.

+

This documentation describes BackupPC version 2.1.2, +released on 5 Sep 2005.

Overview

@@ -403,8 +403,7 @@ BackupPC server data to tape.

Various programs and scripts use rsync to provide hardlinked backups. See, for example, Mike Rubel's site (http://www.mikerubel.org/computers/rsync_snapshots), -JW Schultz's dirvish (http://www.pegasys.ws/dirvish (although as of -June 2004 this link doesn't work)), +JW Schultz's dirvish (http://www.dirvish.org), Ben Escoto's rdiff-backup (http://rdiff-backup.stanford.edu), and John Bowman's rlbackup (http://www.math.ualberta.ca/imaging/rlbackup).

@@ -432,7 +431,7 @@ more and more people find it useful. So feedback is certainly appreciated, both positive and negative.

Beyond being a satisfied user and telling other people about it, everyone is encouraged to add links to http://backuppc.sourceforge.net -(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 @@ -627,27 +626,27 @@ then run these commands:

make install

The same sequence of commands can be used for each module.

Now let's move onto BackupPC itself. After fetching -BackupPC-2.1.0.tar.gz, run these commands as root:

+BackupPC-2.1.2.tar.gz, run these commands as root:

-    tar zxf BackupPC-2.1.0.tar.gz
-    cd BackupPC-2.1.0
+    tar zxf BackupPC-2.1.2.tar.gz
+    cd BackupPC-2.1.2
     perl configure.pl

In the future this release might also have patches available on the SourceForge site. These patch files are text files, with a name of the form

-    BackupPC-2.1.0plN.diff
+ BackupPC-2.1.2plN.diff

where N is the patch level, eg: pl5 is patch-level 5. These patch files are cumulative: you only need apply the last patch file, not all the earlier patch files. If a patch file is -available, eg: BackupPC-2.1.0pl5.diff, you should apply +available, eg: BackupPC-2.1.2pl5.diff, you should apply the patch after extracting the tar file:

-     # fetch BackupPC-2.1.0.tar.gz
-     # fetch BackupPC-2.1.0pl5.diff
-     tar zxf BackupPC-2.1.0.tar.gz
-     cd BackupPC-2.1.0
-     patch -p0 < ../BackupPC-2.1.0pl5.diff
+     # fetch BackupPC-2.1.2.tar.gz
+     # fetch BackupPC-2.1.2pl5.diff
+     tar zxf BackupPC-2.1.2.tar.gz
+     cd BackupPC-2.1.2
+     patch -p0 < ../BackupPC-2.1.2pl5.diff
      perl configure.pl

A patch file includes comments that describe that bug fixes and changes. Feel free to review it before you apply the patch.

@@ -717,7 +716,7 @@ directory.

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. @@ -1046,8 +1045,13 @@ of SSH you have by typing ``ssh'' or ``man ssh''.)

In general this should be similar to Linux/Unix machines. -Mark Stosberg reports that you can also use hfstar. -See http://fink.sourceforge.net/pdb/package.php/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 http://fink.sourceforge.net/pdb/package.php/hfstar.

SSH Setup
@@ -1638,7 +1642,7 @@ status files to keep.

Note that for direct restore to work, the $Conf{XferMethod} must be able to write to the client. For example, that means an SMB share for smbclient needs to be writable, and the rsyncd module -needs ``read only'' set to ``yes''. This creates additional security +needs ``read only'' set to ``false''. This creates additional security risks. If you only create read-only SMB shares (which is a good idea), then the direct restore will fail. You can disable the direct restore option by setting $Conf{SmbClientRestoreCmd}, @@ -2109,7 +2113,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.

BackupPC also listens for TCP connections on $Conf{ServerPort}, which is used by the CGI script BackupPC_Admin for status reporting and @@ -3752,7 +3759,7 @@ this in the per-PC config.pl.

-  - '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.
@@ -4403,7 +4410,7 @@ WAN or dialup connections the round-trip time will be typically more than 20msec. Tune if necessary.

-
$Conf{ClientTimeout} = 7200;
+
$Conf{ClientTimeout} = 72000;
Timeout in seconds when listening for the transport program's @@ -4632,10 +4639,8 @@ need to change the message, copy it here and edit it, eg:

$Conf{EMailNoBackupEverMesg} = <<'EOF'; To: $user$domain cc: - Subject: $subj -
-
-
+  Subject: $subj
+  $headers
   Dear $userName,
@@ -4670,10 +4675,8 @@ need to change the message, copy it here and edit it, eg:

$Conf{EMailNoBackupRecentMesg} = <<'EOF'; To: $user$domain cc: - Subject: $subj -
-
-
+  Subject: $subj
+  $headers
   Dear $userName,
@@ -4708,10 +4711,8 @@ need to change the message, copy it here and edit it, eg:

$Conf{EMailOutlookBackupMesg} = <<'EOF'; To: $user$domain cc: - Subject: $subj -
-
-
+  Subject: $subj
+  $headers
   Dear $userName,
@@ -4936,7 +4937,7 @@ patch level.


Copyright

-

Copyright (C) 2001-2004 Craig Barratt

+

Copyright (C) 2001-2005 Craig Barratt

Back to Top

diff --git a/doc/BackupPC.pod b/doc/BackupPC.pod index 4fd0379..a0d1f02 100644 --- a/doc/BackupPC.pod +++ b/doc/BackupPC.pod @@ -1,7 +1,7 @@ =head1 BackupPC Introduction -This documentation describes BackupPC version 2.1.0, -released on 20 Jun 2004. +This documentation describes BackupPC version 2.1.2, +released on 5 Sep 2005. =head2 Overview @@ -269,8 +269,7 @@ BackupPC server data to tape. Various programs and scripts use rsync to provide hardlinked backups. See, for example, Mike Rubel's site (L), -JW Schultz's dirvish (L (although as of -June 2004 this link doesn't work)), +JW Schultz's dirvish (L), Ben Escoto's rdiff-backup (L), and John Bowman's rlbackup (L). @@ -300,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 @@ -516,29 +515,29 @@ then run these commands: The same sequence of commands can be used for each module. Now let's move onto BackupPC itself. After fetching -BackupPC-2.1.0.tar.gz, run these commands as root: +BackupPC-2.1.2.tar.gz, run these commands as root: - tar zxf BackupPC-2.1.0.tar.gz - cd BackupPC-2.1.0 + tar zxf BackupPC-2.1.2.tar.gz + cd BackupPC-2.1.2 perl configure.pl In the future this release might also have patches available on the SourceForge site. These patch files are text files, with a name of the form - BackupPC-2.1.0plN.diff + BackupPC-2.1.2plN.diff where N is the patch level, eg: pl5 is patch-level 5. These patch files are cumulative: you only need apply the last patch file, not all the earlier patch files. If a patch file is -available, eg: BackupPC-2.1.0pl5.diff, you should apply +available, eg: BackupPC-2.1.2pl5.diff, you should apply the patch after extracting the tar file: - # fetch BackupPC-2.1.0.tar.gz - # fetch BackupPC-2.1.0pl5.diff - tar zxf BackupPC-2.1.0.tar.gz - cd BackupPC-2.1.0 - patch -p0 < ../BackupPC-2.1.0pl5.diff + # fetch BackupPC-2.1.2.tar.gz + # fetch BackupPC-2.1.2pl5.diff + tar zxf BackupPC-2.1.2.tar.gz + cd BackupPC-2.1.2 + patch -p0 < ../BackupPC-2.1.2pl5.diff perl configure.pl A patch file includes comments that describe that bug fixes @@ -600,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. @@ -926,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 @@ -1543,7 +1546,7 @@ status files to keep. Note that for direct restore to work, the $Conf{XferMethod} must be able to write to the client. For example, that means an SMB share for smbclient needs to be writable, and the rsyncd module -needs "read only" set to "yes". This creates additional security +needs "read only" set to "false". This creates additional security risks. If you only create read-only SMB shares (which is a good idea), then the direct restore will fail. You can disable the direct restore option by setting $Conf{SmbClientRestoreCmd}, @@ -1984,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 @@ -3377,7 +3383,7 @@ The valid values are: - '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. @@ -3861,7 +3867,7 @@ local LAN round-trip times should be much less than 20msec. On most WAN or dialup connections the round-trip time will be typically more than 20msec. Tune if necessary. -=item $Conf{ClientTimeout} = 7200; +=item $Conf{ClientTimeout} = 72000; Timeout in seconds when listening for the transport program's (smbclient, tar etc) stdout. If no output is received during this @@ -4049,7 +4055,7 @@ need to change the message, copy it here and edit it, eg: To: $user$domain cc: Subject: $subj - + $headers Dear $userName, This is a site-specific email message. @@ -4076,7 +4082,7 @@ need to change the message, copy it here and edit it, eg: To: $user$domain cc: Subject: $subj - + $headers Dear $userName, This is a site-specific email message. @@ -4103,7 +4109,7 @@ need to change the message, copy it here and edit it, eg: To: $user$domain cc: Subject: $subj - + $headers Dear $userName, This is a site-specific email message. @@ -4276,7 +4282,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/debian-backuppc b/init.d/src/debian-backuppc index 06fbdf4..77adef0 100755 --- a/init.d/src/debian-backuppc +++ b/init.d/src/debian-backuppc @@ -4,7 +4,7 @@ # # Startup init script for BackupPC on Debian. # -# Distributed with BackupPC version 2.1.0, released 20 Jun 2004. +# Distributed with BackupPC version 2.1.2, released 5 Sep 2005. # set -e diff --git a/init.d/src/gentoo-backuppc b/init.d/src/gentoo-backuppc index 0349b9c..5190bcd 100755 --- a/init.d/src/gentoo-backuppc +++ b/init.d/src/gentoo-backuppc @@ -4,7 +4,7 @@ # # Startup init script for BackupPC on Gentoo` linux. # -# Distributed with BackupPC version 2.1.0, released 20 Jun 2004. +# Distributed with BackupPC version 2.1.2, released 5 Sep 2005. # # description: Starts and stops the BackupPC server # Copy to /etc/init.d and run 'rc-update add backuppc default' @@ -34,6 +34,7 @@ stop() { restart() { ebegin "Restarting BackupPC" svc_stop + sleep 1 svc_start eend $? "Failed to restart BackupPC" } diff --git a/init.d/src/linux-backuppc b/init.d/src/linux-backuppc index 17d12c3..aa55ccf 100755 --- a/init.d/src/linux-backuppc +++ b/init.d/src/linux-backuppc @@ -4,7 +4,7 @@ # # Startup init script for BackupPC on Redhat linux. # -# Distributed with BackupPC version 2.1.0, released 20 Jun 2004. +# Distributed with BackupPC version 2.1.2, released 5 Sep 2005. # # chkconfig: - 91 35 # description: Starts and stops the BackupPC server diff --git a/init.d/src/solaris-backuppc b/init.d/src/solaris-backuppc index 23fc786..0a69038 100755 --- a/init.d/src/solaris-backuppc +++ b/init.d/src/solaris-backuppc @@ -4,7 +4,7 @@ # # Startup init script for BackupPC for solaris. # -# Distributed with BackupPC version 2.1.0, released 20 Jun 2004. +# Distributed with BackupPC version 2.1.2, released 5 Sep 2005. # # Not tested... # diff --git a/init.d/src/suse-backuppc b/init.d/src/suse-backuppc index f5917db..6328271 100755 --- a/init.d/src/suse-backuppc +++ b/init.d/src/suse-backuppc @@ -4,7 +4,7 @@ # # Startup init script for BackupPC on suse linux. # -# Distributed with BackupPC version 2.1.0, released 20 Jun 2004. +# Distributed with BackupPC version 2.1.2, released 5 Sep 2005. # set -e 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 cc76f64..f6563bd 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. # @@ -102,8 +102,10 @@ sub NewRequest $Lang = $bpc->Lang(); $ConfigMTime = $bpc->ConfigMTime(); } elsif ( $bpc->ConfigMTime() != $ConfigMTime ) { - $bpc->ServerMesg("log Re-read config file because mtime changed"); - $bpc->ServerMesg("server reload"); + $bpc->ConfigRead(); + %Conf = $bpc->Conf(); + $Lang = $bpc->Lang(); + $ConfigMTime = $bpc->ConfigMTime(); } # @@ -154,6 +156,15 @@ EOF {map {$_, 1} split(",", $Hosts->{$host}{moreUsers}) } } } + + # + # Untaint the host name + # + if ( $In{host} =~ /^([\w.\s-]+)$/ ) { + $In{host} = $1; + } else { + delete($In{host}); + } } sub timeStamp2 @@ -278,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); @@ -455,7 +468,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\""); } @@ -505,7 +519,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..f07e3d3 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 @@ -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")} @@ -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)}")} @@ -880,7 +880,7 @@ $Lang{Restore___num_details_for__host2} = <
    - +
    Type Nb de Fichiers Taille/Mo Mo/sec Mo/s Nb de Fichiers Taille/Mo Nb de Fichiers 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..518f7de 100644 --- a/lib/BackupPC/Lang/it.pm +++ b/lib/BackupPC/Lang/it.pm @@ -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 2431e53..e4f47b2 100644 --- a/lib/BackupPC/Lang/nl.pm +++ b/lib/BackupPC/Lang/nl.pm @@ -2,7 +2,7 @@ #my %lang; #use strict; -#File: nl.pm version 1.3 +#File: nl.pm version 1.5 # -------------------------------- $Lang{Start_Archive} = "Start Archivering"; @@ -79,7 +79,7 @@ $Lang{BackupPC_Server_Status_General_Info}= < -eof +EOF $Lang{BackupPC_Server_Status} = <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 @@ -483,7 +482,7 @@ EOF $Lang{Restore_Options_for__host_Option1_disabled} = < $topDir || '__TOPDIR__', BinDir => $installDir || '__INSTALLDIR__', LibDir => $installDir || '__INSTALLDIR__', - Version => '2.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 ca61223..4b0a0f7 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. # @@ -195,9 +195,10 @@ sub dirCache } } } - $m->{files}{$fileUM}{relPath} = "$dir/$fileUM"; - $m->{files}{$fileUM}{sharePathM} = "$sharePathM/$file"; - $m->{files}{$fileUM}{fullPath} = "$path/$file"; + ($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]; @@ -447,9 +448,10 @@ sub dirHistory } } } - $files->{$fileUM}[$i]{relPath} = "$dir/$fileUM"; - $files->{$fileUM}[$i]{sharePathM} = "$sharePathM/$file"; - $files->{$fileUM}[$i]{fullPath} = "$path/$file"; + ($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]; 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 3d32dff..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. # @@ -711,6 +711,17 @@ sub fileDeltaRxStart . " ($fio->{rxFile}{size} vs $rxSize)") if ( $fio->{logLevel} >= 5 ); } + # + # If compression was off and now on, or on and now off, then + # don't do an exact match. + # + if ( defined($fio->{rxLocalAttr}) + && !$fio->{rxLocalAttr}{compress} != !$fio->{xfer}{compress} ) { + $fio->{rxMatchBlk} = undef; # compression changed, so no file match + $fio->log("$fio->{rxFile}{name}: compression changed, so no match" + . " ($fio->{rxLocalAttr}{compress} vs $fio->{xfer}{compress})") + if ( $fio->{logLevel} >= 4 ); + } delete($fio->{rxInFd}); delete($fio->{rxOutFd}); delete($fio->{rxDigest}); diff --git a/lib/BackupPC/Xfer/Smb.pm b/lib/BackupPC/Xfer/Smb.pm index dbc5600..51ae10c 100644 --- a/lib/BackupPC/Xfer/Smb.pm +++ b/lib/BackupPC/Xfer/Smb.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.1, released 13 Mar 2005. +# Version 2.1.2, released 5 Sep 2005. # # See http://backuppc.sourceforge.net. # @@ -139,7 +139,7 @@ sub start } my $args = { smbClientPath => $conf->{SmbClientPath}, - host => $conf->{SmbHostName} || $t->{host}, + host => $t->{host}, hostIP => $t->{hostIP}, client => $t->{client}, shareName => $t->{shareName}, 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. # -- 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