From 4cdaa6b8a9f5161ee2da4371d68cbbad41248ea0 Mon Sep 17 00:00:00 2001 From: cbarratt Date: Wed, 12 Jul 2006 02:15:15 +0000 Subject: [PATCH] * lots of minor changes to prepare for 3.0.0beta0 release * fixes for hardlinks in multi-level incrementals * changed buttons actions to javascript so i18n strings work correctly * added features to BackupPC_sendEmail * updates docs, configure.pl and makeDist --- ChangeLog | 34 +- bin/BackupPC | 2 +- bin/BackupPC_archive | 2 +- bin/BackupPC_archiveHost | 2 +- bin/BackupPC_attribPrint | 2 +- bin/BackupPC_compressPool | 2 +- bin/BackupPC_dump | 35 +- bin/BackupPC_fixupBackupSummary | 2 +- bin/BackupPC_link | 2 +- bin/BackupPC_nightly | 2 +- bin/BackupPC_restore | 2 +- bin/BackupPC_sendEmail | 77 +++- bin/BackupPC_serverMesg | 2 +- bin/BackupPC_tarCreate | 2 +- bin/BackupPC_tarExtract | 2 +- bin/BackupPC_tarPCCopy | 2 +- bin/BackupPC_trashClean | 2 +- bin/BackupPC_zcat | 2 +- bin/BackupPC_zipCreate | 2 +- cgi-bin/BackupPC_Admin | 21 +- conf/BackupPC_stnd.css | 6 +- conf/config.pl | 6 +- configure.pl | 119 +++++-- doc-src/BackupPC.pod | 520 ++++++++++++++-------------- images/icon-hardlink.gif | Bin 0 -> 458 bytes 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/EditConfig.pm | 28 +- lib/BackupPC/CGI/EmailSummary.pm | 2 +- lib/BackupPC/CGI/GeneralInfo.pm | 2 +- lib/BackupPC/CGI/HostInfo.pm | 8 +- lib/BackupPC/CGI/LOGlist.pm | 2 +- lib/BackupPC/CGI/Lib.pm | 9 +- lib/BackupPC/CGI/Queue.pm | 2 +- lib/BackupPC/CGI/RSS.pm | 2 +- lib/BackupPC/CGI/ReloadServer.pm | 2 +- lib/BackupPC/CGI/Restore.pm | 2 +- lib/BackupPC/CGI/RestoreFile.pm | 2 +- lib/BackupPC/CGI/RestoreInfo.pm | 2 +- lib/BackupPC/CGI/StartServer.pm | 2 +- lib/BackupPC/CGI/StartStopBackup.pm | 12 +- lib/BackupPC/CGI/StopServer.pm | 2 +- lib/BackupPC/CGI/Summary.pm | 2 +- lib/BackupPC/CGI/View.pm | 2 +- lib/BackupPC/Config/Meta.pm | 7 +- lib/BackupPC/FileZIO.pm | 2 +- lib/BackupPC/Lang/de.pm | 276 ++++++++------- lib/BackupPC/Lang/en.pm | 81 +++-- lib/BackupPC/Lang/es.pm | 75 ++-- lib/BackupPC/Lang/fr.pm | 75 ++-- lib/BackupPC/Lang/it.pm | 75 ++-- lib/BackupPC/Lang/nl.pm | 361 ++++++++++--------- lib/BackupPC/Lang/pt_br.pm | 256 ++++++++------ lib/BackupPC/Lib.pm | 4 +- lib/BackupPC/PoolWrite.pm | 2 +- lib/BackupPC/Storage.pm | 2 +- lib/BackupPC/Storage/Text.pm | 25 +- lib/BackupPC/View.pm | 38 +- lib/BackupPC/Xfer/Archive.pm | 2 +- lib/BackupPC/Xfer/BackupPCd.pm | 2 +- lib/BackupPC/Xfer/Rsync.pm | 11 +- lib/BackupPC/Xfer/RsyncDigest.pm | 2 +- lib/BackupPC/Xfer/RsyncFileIO.pm | 97 ++++-- lib/BackupPC/Xfer/Smb.pm | 2 +- lib/BackupPC/Xfer/Tar.pm | 2 +- lib/BackupPC/Zip/FileMember.pm | 2 +- makeDist | 35 +- 71 files changed, 1383 insertions(+), 996 deletions(-) create mode 100644 images/icon-hardlink.gif diff --git a/ChangeLog b/ChangeLog index a82518d..c8b91ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,7 +24,7 @@ * Added configuration and host CGI editor. * Added rsync hardlink support. Requires latest version of - File::RsyncP. + File::RsyncP (0.62). * Decoupled BackupPC_dump from BackupPC_nightly by making asynchronous file linking/delete robust to race conditions. @@ -40,7 +40,8 @@ (level 0). Default configuration is all incrementals are level 1. * Server file names are now in utf8 and optional conversion - to/from client name charsets is done. + to/from client name charsets can be configured. All CGI pages + now use the utf8 charset. * Backup metadata is now additionally saved to pc/HOST/nnn/backupInfo, in addition to pc/HOST/backups. In case pc/HOST/backups gets trashed, @@ -48,12 +49,6 @@ metadata from pc/HOST/nnn/backupInfo and reconstruct the backups file. Roberto Moreno also pointed out an early error in the CVS version. -* In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs} - and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and - "Can't open .../f%2f for empty output" errors with rsync 2.6.7+. - Fix proposed by Justin Pessa and Vincent Ho, and confirmed by - Dan Niles. - * Added Storage module and Storage::Text which localizes all the text data file reading/writing (eg: backups, restores, archives and config.pl files). Added read verify after all write @@ -64,6 +59,15 @@ * Added Config module, and Config::Meta that contains meta data about configuration parameters. +* Added RSS support from Rich Duzenbury. + +* Translations of new 3.0 language strings from Guillaume Filion, + Reginaldo Ferreira, Ralph Passgang, Lieven Bridts, Guus Houtzager, + Rodrigo Real. + +* Added optional checking of exit status of Dump/Restore/Archive Pre/Post + UserCmd, requested by Kiko Jover, Matthias Bertschy and others. + * Added Slackware init.d script from Tony Nelson. * Fixed error reporting when restore/archive fail to write the @@ -71,9 +75,6 @@ * Applied patch from Marc Prewitt for DumpPreShareCmd and DumpPostShareCmd. -* Added checking of exit status of Dump/Restore/Archive Pre/Post UserCmd, - requested by Kiko Jover, Matthias Bertschy and others. - * Apply patch from Pete Wenzel to add smbClientPath => $Conf{SmbClientPath} to DumpPreUserCmd etc. @@ -122,7 +123,8 @@ via the exit status, instead of just the last. * Added $Conf{EMailHeaders} for additional email headers, requested - by Ludovic Gasc. + by Ludovic Gasc. If the Content-Type charset is set to utf8 then + the body of the email is sent in utf8 coding. * Made shareName argument regexp checking more general to allow parens. @@ -132,9 +134,15 @@ * Documentation updates from Richard Ames, JP Vossen, Torsten Finke. #------------------------------------------------------------------------ -# Version 2.1.2pl1, __RELEASEDATE__ +# Version 2.1.2pl2, 18 Jun 2006 #------------------------------------------------------------------------ +* In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs} + and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and + "Can't open .../f%2f for empty output" errors with rsync 2.6.7+. + Fix proposed by Justin Pessa and Vincent Ho, and confirmed by + Dan Niles. + * Added patch from Michael (mna.news) to ignore "file is unchanged" message from tar 1.15.x during incremental backups. diff --git a/bin/BackupPC b/bin/BackupPC index 426b59e..d981c18 100755 --- a/bin/BackupPC +++ b/bin/BackupPC @@ -47,7 +47,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive index e1e9900..9695906 100644 --- a/bin/BackupPC_archive +++ b/bin/BackupPC_archive @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_archiveHost b/bin/BackupPC_archiveHost index bf9a506..ff033bf 100755 --- a/bin/BackupPC_archiveHost +++ b/bin/BackupPC_archiveHost @@ -38,7 +38,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_attribPrint b/bin/BackupPC_attribPrint index 9e02e5c..8a7d58c 100755 --- a/bin/BackupPC_attribPrint +++ b/bin/BackupPC_attribPrint @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_compressPool b/bin/BackupPC_compressPool index 6d03bfe..8d173e1 100755 --- a/bin/BackupPC_compressPool +++ b/bin/BackupPC_compressPool @@ -49,7 +49,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index 7ba9e3e..4472b23 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -70,7 +70,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -207,12 +207,12 @@ if ( !-f $logPath ) { unlink($file); next; } + $lastLog--; next if ( $file =~ /\.z$/ || !$Conf{CompressLevel} ); BackupPC::FileZIO->compressCopy($file, "$file.z", undef, $Conf{CompressLevel}, 1); - $lastLog--; } } @@ -302,6 +302,7 @@ my $lastFullTime = 0; my $lastIncrTime = 0; my $partialIdx = -1; my $partialNum; +my $lastBkupNum; my $lastPartial = 0; # @@ -332,23 +333,10 @@ if ( !$opts{i} && !$opts{f} && $Conf{BlackoutGoodCnt} >= 0 my($currHours) = $hour + $min / 60 + $sec / 3600; my $blackout; - # - # Handle backward compatibility with original separate scalar - # parameters. - # - if ( defined($Conf{BlackoutHourBegin}) ) { - push(@{$Conf{BlackoutPeriods}}, - { - hourBegin => $Conf{BlackoutHourBegin}, - hourEnd => $Conf{BlackoutHourEnd}, - weekDays => $Conf{BlackoutWeekDays}, - } - ); - } foreach my $p ( @{$Conf{BlackoutPeriods}} ) { # - # Allow blackout to span midnight (specified by BlackoutHourBegin - # being greater than BlackoutHourEnd) + # Allow blackout to span midnight (specified by hourBegin + # being greater than hourEnd) # next if ( ref($p->{weekDays}) ne "ARRAY" || !defined($p->{hourBegin}) @@ -405,12 +393,14 @@ for ( my $i = 0 ; $i < @Backups ; $i++ ) { || -f "$Dir/NewFileList.$Backups[$i]{num}" ); if ( $Backups[$i]{type} eq "full" ) { $incrCntSinceFull = 0; + $lastBkupNum = $Backups[$i]{num}; $lastIdxByLevel[0] = $i; if ( $lastFullTime < $Backups[$i]{startTime} ) { $lastFullTime = $Backups[$i]{startTime}; } } elsif ( $Backups[$i]{type} eq "incr" ) { $incrCntSinceFull++; + $lastBkupNum = $Backups[$i]{num}; $lastIdxByLevel[$Backups[$i]{level}] = $i; $lastIncrTime = $Backups[$i]{startTime} if ( $lastIncrTime < $Backups[$i]{startTime} ); @@ -429,6 +419,8 @@ if ( @Backups == 0 || (!$opts{i} && (time - $lastFullTime > $Conf{FullPeriod} * 24*3600 && time - $lastIncrTime > $Conf{IncrPeriod} * 24*3600)) ) { $type = "full"; + $incrLevel = 0; + $incrBaseBkupNum = $lastBkupNum; } elsif ( $opts{i} || (time - $lastIncrTime > $Conf{IncrPeriod} * 24*3600 && time - $lastFullTime > $Conf{IncrPeriod} * 24*3600) ) { $type = "incr"; @@ -446,7 +438,7 @@ if ( @Backups == 0 my $idx = $lastIdxByLevel[$i]; next if ( !defined($idx) ); if ( !defined($incrBaseTime) - || $Backups[$idx]{startTime} < $incrBaseTime ) { + || $Backups[$idx]{startTime} > $incrBaseTime ) { $incrBaseBkupNum = $Backups[$idx]{num}; $incrBaseLevel = $Backups[$idx]{level}; $incrBaseTime = $Backups[$idx]{startTime}; @@ -456,7 +448,10 @@ if ( @Backups == 0 # Can't find any earlier lower-level backup! Shouldn't # happen - just do full instead # - $type = "full" if ( !defined($incrBaseBkupNum) || $incrLevel < 1 ); + if ( !defined($incrBaseBkupNum) || $incrLevel < 1 ) { + $type = "full"; + $incrBaseBkupNum = $lastBkupNum; + } } else { NothingToDo($needLink); } @@ -763,6 +758,7 @@ for my $shareName ( @$ShareNames ) { close(WH); } print(LOG $bpc->timeStamp, $logMsg, "\n"); + $XferLOG->write(\"$logMsg\n"); print("started $type dump, share=$shareName\n"); pidHandler(@xferPid); @@ -1275,6 +1271,7 @@ sub BackupExpire # where $Conf{FullKeepCnt} is an array. # last if ( !BackupFullExpire($client, \@Backups) ); + $changes++; } $bpc->BackupInfoWrite($client, @Backups) if ( $changes ); } diff --git a/bin/BackupPC_fixupBackupSummary b/bin/BackupPC_fixupBackupSummary index c163b99..86e5e41 100755 --- a/bin/BackupPC_fixupBackupSummary +++ b/bin/BackupPC_fixupBackupSummary @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_link b/bin/BackupPC_link index e4a7b22..20825f2 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly index c38e68e..9794b67 100755 --- a/bin/BackupPC_nightly +++ b/bin/BackupPC_nightly @@ -55,7 +55,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore index ff9b413..3f58ca6 100755 --- a/bin/BackupPC_restore +++ b/bin/BackupPC_restore @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail index 3f82313..33824e2 100755 --- a/bin/BackupPC_sendEmail +++ b/bin/BackupPC_sendEmail @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -61,21 +61,65 @@ use vars qw(%UserEmailInfo); do "$LogDir/UserEmailInfo.pl"; my %opts; -if ( !getopts("t", \%opts) || @ARGV != 0 ) { - print("usage: $0 [-t]\n"); +if ( !getopts("ctu:", \%opts) || @ARGV != 0 ) { + print <ServerConnect($Conf{ServerHost}, $Conf{ServerPort}); if ( $err ) { + if ( $opts{c} && $Conf{EMailAdminUserName} ne "" ) { + my $headers = $Conf{EMailHeaders}; + $headers .= "\n" if ( $headers !~ /\n$/ ); + my $mesg = <ServerMesg("status hosts"); $reply = $1 if ( $reply =~ /(.*)/s ); my(%Status, %Info, %Jobs, @BgQueue, @UserQueue, @CmdQueue); eval($reply); +########################################################################### +# Generate test message if required +########################################################################### +if ( $opts{u} ne "" ) { + my $headers = $Conf{EMailHeaders}; + $headers .= "\n" if ( $headers !~ /\n$/ ); + my $mesg = <{$1}) ? $vars->{$1} : "\$$1"/eg; $vars->{subj} = $subj; $mesg =~ s/\$(\w+)/defined($vars->{$1}) ? $vars->{$1} : "\$$1"/eg; - if ( $opts{t} ) { - print("#" x 75, "\n"); - print $mesg; - } else { - SendMail($mesg); - } + SendMail($mesg); $UserEmailInfo{$user}{lastTime} = time; $UserEmailInfo{$user}{lastSubj} = $subj; $UserEmailInfo{$user}{lastHost} = $host; @@ -334,14 +368,25 @@ sub sendUserEmail sub SendMail { my($mesg) = @_; - my($from) = $Conf{EMailFromUserName}; + my $from = $Conf{EMailFromUserName}; + my $utf8 = 1 + if ( $Conf{EMailHeaders} =~ /Content-Type:.*charset="utf-?8"/i ); local(*MAIL); + if ( $opts{t} ) { + binmode(STDOUT, ":utf8") if ( $utf8 ); + print("#" x 75, "\n"); + print $mesg; + return; + } $from = "-f $from" if ( $from ne "" ); + print("Sending test email using $Conf{SendmailPath} -t $from\n") + if ( $opts{u} ne "" ); if ( !open(MAIL, "|$Conf{SendmailPath} -t $from") ) { printf("Can't run sendmail ($Conf{SendmailPath}): $!\n"); return; } + binmode(MAIL, ":utf8") if ( $utf8 ); print MAIL $mesg; close(MAIL); } diff --git a/bin/BackupPC_serverMesg b/bin/BackupPC_serverMesg index 93b1f9b..3a9f512 100755 --- a/bin/BackupPC_serverMesg +++ b/bin/BackupPC_serverMesg @@ -43,7 +43,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index f704255..d0f4fe7 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -53,7 +53,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract index 55217b9..0ab4b99 100755 --- a/bin/BackupPC_tarExtract +++ b/bin/BackupPC_tarExtract @@ -27,7 +27,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_tarPCCopy b/bin/BackupPC_tarPCCopy index f2d96b1..8c6ff2e 100755 --- a/bin/BackupPC_tarPCCopy +++ b/bin/BackupPC_tarPCCopy @@ -36,7 +36,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index df733e6..e74792f 100755 --- a/bin/BackupPC_trashClean +++ b/bin/BackupPC_trashClean @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat index 4b08bec..c316f93 100755 --- a/bin/BackupPC_zcat +++ b/bin/BackupPC_zcat @@ -32,7 +32,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index 8e0b483..adcb709 100755 --- a/bin/BackupPC_zipCreate +++ b/bin/BackupPC_zipCreate @@ -52,7 +52,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index ac43d85..082b91e 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -58,23 +58,23 @@ BackupPC::CGI::Lib::NewRequest; my %ActionDispatch = ( "summary" => "Summary", - $Lang->{Start_Incr_Backup} => "StartStopBackup", - $Lang->{Start_Full_Backup} => "StartStopBackup", - $Lang->{Stop_Dequeue_Backup} => "StartStopBackup", - $Lang->{Stop_Dequeue_Archive} => "StartStopBackup", + "Start_Incr_Backup" => "StartStopBackup", + "Start_Full_Backup" => "StartStopBackup", + "Stop_Dequeue_Backup" => "StartStopBackup", + "Stop_Dequeue_Archive" => "StartStopBackup", "queue" => "Queue", "view" => "View", "LOGlist" => "LOGlist", "emailSummary" => "EmailSummary", "browse" => "Browse", "dirHistory" => "DirHistory", - $Lang->{Restore} => "Restore", + "Restore" => "Restore", "RestoreFile" => "RestoreFile", "hostInfo" => "HostInfo", "generalInfo" => "GeneralInfo", "restoreInfo" => "RestoreInfo", "archiveInfo" => "ArchiveInfo", - $Lang->{Start_Archive} => "Archive", + "Start_Archive" => "Archive", "Archive" => "Archive", "Reload" => "ReloadServer", "startServer" => "StartServer", @@ -87,9 +87,10 @@ my %ActionDispatch = ( # # Set default actions, then call sub handler # -$In{action} ||= "hostInfo" if ( defined($In{host}) ); -$In{action} = "generalInfo" if ( !defined($ActionDispatch{$In{action}}) ); -my $action = $ActionDispatch{$In{action}}; +if ( !defined($ActionDispatch{$In{action}}) ) { + $In{action} = defined($In{host}) ? "hostInfo" : "generalInfo"; +} +my $action = $ActionDispatch{$In{action}}; # # For some reason under mod_perl, the use lib above is unreliable, diff --git a/conf/BackupPC_stnd.css b/conf/BackupPC_stnd.css index 19e77e3..42c81cd 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 3.0.0beta0, released 11 Jul 2006. * * See http://backuppc.sourceforge.net. * @@ -136,6 +136,10 @@ a.navbar { font-size:10pt; } +.editTextInput { + font-family:courier; +} + .fviewheader { font-weight:bold; font-size:10pt; diff --git a/conf/config.pl b/conf/config.pl index 824ae77..62c301a 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -1205,6 +1205,7 @@ $Conf{RsyncArgs} = [ '--group', '-D', '--links', + '--hard-links', '--times', '--block-size=2048', '--recursive', @@ -1239,6 +1240,7 @@ $Conf{RsyncRestoreArgs} = [ '--group', '-D', '--links', + '--hard-links', '--times', '--block-size=2048', '--relative', @@ -1789,7 +1791,9 @@ $Conf{EMailOutlookBackupSubj} = undef; $Conf{EMailOutlookBackupMesg} = undef; # -# Additional email headers +# Additional email headers. If you change the charset +# to utf8 then BackupPC_sendEmail will use utf8 for +# the email body. # $Conf{EMailHeaders} = < Full path to existing main config.pl", $ConfigPath, "config-path"); @@ -174,6 +181,7 @@ while ( 1 ) { print("Need to specify a valid --config-path for upgrade\n"); exit(1); } + $ConfigFileOK = 0; } $opts{fhs} = 1 if ( !defined($opts{fhs}) && $ConfigPath eq "" ); $opts{fhs} = 0 if ( !defined($opts{fhs}) ); @@ -210,9 +218,9 @@ EOF # if ( $opts{fhs} ) { $Conf{TopDir} ||= "/data/BackupPC"; - $Conf{ConfDir} ||= "/etc/BackupPC"; + $Conf{ConfDir} ||= $opts{"config-dir"} || "/etc/BackupPC"; $Conf{InstallDir} ||= "/usr/local/BackupPC"; - $Conf{LogDir} ||= "/var/log/BackupPC"; + $Conf{LogDir} ||= $opts{"log-dir"} || "/var/log/BackupPC"; } # @@ -295,9 +303,8 @@ the main data directory and read/execute permission on the install directory (these directories will be setup shortly). The primary group for this user should also be chosen carefully. -By default the install directories will have group write permission. -The data directories and files will have group read permission but -no other permission. +The data directories and files will have group read permission, +so group members can access backup files. EOF my($name, $passwd, $Uid, $Gid); @@ -508,7 +515,7 @@ foreach my $dir ( qw(bin doc lib/BackupPC/Zip ) ) { next if ( -d "$DestDir$Conf{InstallDir}/$dir" ); - mkpath("$DestDir$Conf{InstallDir}/$dir", 0, 0775); + mkpath("$DestDir$Conf{InstallDir}/$dir", 0, 0755); if ( !-d "$DestDir$Conf{InstallDir}/$dir" || !my_chown($Uid, $Gid, "$DestDir$Conf{InstallDir}/$dir") ) { die("Failed to create or chown $DestDir$Conf{InstallDir}/$dir\n"); @@ -522,7 +529,7 @@ foreach my $dir ( qw(bin doc # foreach my $dir ( ($Conf{CgiImageDir}) ) { next if ( $dir eq "" || -d $dir ); - mkpath("$DestDir$dir", 0, 0775); + mkpath("$DestDir$dir", 0, 0755); if ( !-d "$DestDir$dir" || !my_chown($Uid, $Gid, "$DestDir$dir") ) { die("Failed to create or chown $DestDir$dir"); } else { @@ -605,18 +612,20 @@ InstallFile("conf/hosts", "$DestDir$Conf{ConfDir}/hosts", 0644) # parameters and deleting ones that are no longer needed. # my $dest = "$DestDir$Conf{ConfDir}/config.pl"; -my ($newConf, $newVars) = ConfigParse("conf/config.pl"); +my ($distConf, $distVars) = ConfigParse("conf/config.pl"); my ($oldConf, $oldVars); +my ($newConf, $newVars) = ($distConf, $distVars); if ( -f $dest ) { ($oldConf, $oldVars) = ConfigParse($dest); - $newConf = ConfigMerge($oldConf, $oldVars, $newConf, $newVars); + ($newConf, $newVars) = ConfigMerge($oldConf, $oldVars, $distConf, $distVars); } -$Conf{EMailFromUserName} ||= $Conf{BackupPCUser}; -$Conf{EMailAdminUserName} ||= $Conf{BackupPCUser}; # -# Update various config parameters +# Update various config parameters. The old config is in Conf{} +# and the new config is an array in text form in $newConf->[]. # +$Conf{EMailFromUserName} ||= $Conf{BackupPCUser}; +$Conf{EMailAdminUserName} ||= $Conf{BackupPCUser}; # # Guess $Conf{CgiURL} @@ -719,6 +728,47 @@ if ( defined($Conf{SmbClientTimeout}) ) { delete($Conf{SmbClientTimeout}); } +# +# Replace --devices with -D in RsyncArgs and RsyncRestoreArgs +# +foreach my $param ( qw(RsyncArgs RsyncRestoreArgs) ) { + next if ( !defined($newVars->{$param}) ); + $newConf->[$newVars->{$param}]{text} =~ s/--devices/-D/g; +} + +# +# Merge any new user-editable parameters into CgiUserConfigEdit +# by copying the old settings forward. +# +if ( defined($Conf{CgiUserConfigEdit}) ) { + # + # This is a real hack. The config file merging is done in text + # form without actually instantiating the new conf structure. + # So we need to extract the new hash of settings, update it, + # and merge the text. Ugh... + # + my $new; + my $str = $distConf->[$distVars->{CgiUserConfigEdit}]{text}; + + $str =~ s/^\s*\$Conf\{.*?\}\s*=\s*/\$new = /m; + eval($str); + foreach my $p ( keys(%$new) ) { + $new->{$p} = $Conf{CgiUserConfigEdit}{$p} + if ( defined($Conf{CgiUserConfigEdit}{$p}) ); + } + $Conf{CgiUserConfigEdit} = $new; + my $d = Data::Dumper->new([$new], [*value]); + $d->Indent(1); + $d->Terse(1); + my $value = $d->Dump; + $value =~ s/(.*)\n/$1;\n/s; + $newConf->[$newVars->{CgiUserConfigEdit}]{text} + =~ s/(\s*\$Conf\{.*?\}\s*=\s*).*/$1$value/s; +} + +# +# Now backup and write the config file +# my $confCopy = "$dest.pre-__VERSION__"; if ( -f $dest && !-f $confCopy ) { # @@ -772,9 +822,9 @@ Ok, it looks like we are finished. There are several more things you will need to do: - Browse through the config file, $Conf{ConfDir}/config.pl, - and make sure all the settings are correct. In particular, you - will need to set the smb share password and user name, backup - policies and check the email message headers and bodies. + and make sure all the settings are correct. In particular, + you will need to set \$Conf{CgiAdminUsers} so you have + administration privileges in the CGI interface. - Edit the list of hosts to backup in $Conf{ConfDir}/hosts. @@ -943,7 +993,7 @@ sub ConfigMerge { my($old, $oldVars, $new, $newVars) = @_; my $posn = 0; - my $res; + my($res, $resVars); # # Find which config parameters are not needed any longer @@ -975,7 +1025,10 @@ sub ConfigMerge push(@$res, $new); } } - return $res; + for ( my $i = 0 ; $i < @$res ; $i++ ) { + $resVars->{$res->[$i]{var}} = $i; + } + return ($res, $resVars); } sub my_chown @@ -1065,6 +1118,12 @@ Examples Set the configuration compression level to N. Default is 3 if Compress::Zlib is installed. +=item B<--config-dir CONFIG_DIR> + +Configuration directory for new installations. Defaults +to /etc/BackupPC with FHS. Automatically extracted +from --config-path for existing installations. + =item B<--config-path CONFIG_PATH> Path to the existing config.pl configuration file for BackupPC. @@ -1147,6 +1206,10 @@ Example: --install-dir /usr/local/BackupPC +=item B<--log-dir LOG_DIR> + +Log directory. Defaults to /var/log/BackupPC with FHS. + =item B<--man> Prints the manual page and exits. diff --git a/doc-src/BackupPC.pod b/doc-src/BackupPC.pod index cc4175e..ef4b9e4 100644 --- a/doc-src/BackupPC.pod +++ b/doc-src/BackupPC.pod @@ -6,8 +6,8 @@ released on __RELEASEDATE__. =head2 Overview BackupPC is a high-performance, enterprise-grade system for backing up -Unix, Linux and WinXX PCs, desktops and laptops to a server's disk. -BackupPC is highly configurable and easy to install and maintain. +Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's +disk. BackupPC is highly configurable and easy to install and maintain. Given the ever decreasing cost of disks and raid systems, it is now practical and cost effective to backup a large number of machines onto @@ -34,24 +34,24 @@ new files (those not already in the pool) need to be compressed. =item * -A powerful http/cgi user interface allows administrators to view log -files, configuration, current status and allows users to initiate and -cancel backups and browse and restore files from backups. +A powerful http/cgi user interface allows administrators to view +the current status, edit configuration, add/delete hosts, view log +files, and allows users to initiate and cancel backups and browse +and restore files from backups. =item * The http/cgi user interface has internationalization (i18n) support, -currently providing English, French, German, Spanish, Italian -and Dutch. +currently providing English, French, German, Spanish, Italian, +Dutch and Portuguese-Brazilian. =item * -No client-side software is needed. On WinXX the standard smb -protocol is used to extract backup data. On linux or unix clients, -rsync or tar (over ssh/rsh/nfs) is used to extract backup data. -Alternatively, rsync can also be used on WinXX (using cygwin), -and Samba could be installed on the linux or unix client to -provide smb shares). +No client-side software is needed. On WinXX the standard smb protocol is +used to extract backup data. On linux, unix or MacOSX clients, rsync or +tar (over ssh/rsh/nfs) is used to extract backup data. Alternatively, +rsync can also be used on WinXX (using cygwin), and Samba could be +installed on the linux or unix client to provide smb shares). =item * @@ -107,25 +107,39 @@ number of older fulls that are 2, 4, 8, or 16 weeks apart). =item Incremental Backup -An incremental backup is a backup of files that have changed (based on -their modification time) since the last successful full backup. For -SMB and tar, BackupPC backups all files that have changed since one -hour prior to the start of the last successful full backup. Rsync is -more clever: any files whose attributes have changed (ie: uid, gid, -mtime, modes, size) since the last full are backed up. Deleted, new -files and renamed files are detected by Rsync incrementals. -In constrast, SMB and tar incrementals are not able to detect deleted -files, renamed files or new files whose modification time is prior to -the last full dump. +An incremental backup is a backup of files that have changed +since the last successful full or incremental backup. Starting +in BackupPC 3.0 multi-level incrementals are supported. +A full backup has level 0. A new incremental of level N will +backup all files that have changed since the most recent backup +of a lower level. $Conf{IncrLevels} is used to specify the +level of each successive incremental. The default value is +all level 1, which makes the behavior the same as earlier +versions of BackupPC: each incremental will back up all the +files that changed since the last full (level 0). + +For SMB and tar, BackupPC uses the modification time (mtime) to +determine which files have changed since the last lower-level +backup. That mean SMB and tar incrementals are not able to detect +deleted files, renamed files or new files whose modification time +is prior to the last lower-level backup. + +Rsync is more clever: any files whose attributes have changed (ie: uid, +gid, mtime, modes, size) since the last full are backed up. Deleted, +new files and renamed files are detected by Rsync incrementals. BackupPC can also be configured to keep a certain number of incremental backups, and to keep a smaller number of very old incremental backups. -(BackupPC does not support multi-level incremental backups, although it -will in a future version.) +If multi-level incrementals are specified then it is likely that +more incrementals will need to be kept since lower-level incrementals +(and the full backup) are needed to reconstruct a higher-level +incremental. -BackupPC's CGI interface "fills-in" incremental backups based on the -last full backup, giving every backup a "full" appearance. This makes -browsing and restoring backups easier. +BackupPC "fills-in" incremental backups when browsing or restoring, +based on the levels of each backup, giving every backup a "full" +appearance. This makes browsing and restoring backups much easier: +you can restore from any one backup independent of whether it was +an incremental or full. =item Partial Backup @@ -251,16 +265,11 @@ Do not send subscription requests to this address! =item Other Programs of Interest If you want to mirror linux or unix files or directories to a remote server -you should use rsync, L. BackupPC now uses +you should use rsync, L. BackupPC uses rsync as a transport mechanism; if you are already an rsync user you can think of BackupPC as adding efficient storage (compression and pooling) and a convenient user interface to rsync. -Unison is a utility that can do two-way, interactive, synchronization. -See L. An external wrapper around -rsync that maintains transfer data to enable two-way synchronization is -drsync; see L. - Two popular open source packages that do tape backup are Amanda (L) and Bacula (L). @@ -271,13 +280,18 @@ 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), -Ben Escoto's rdiff-backup (L), +Ben Escoto's rdiff-backup (L), and John Bowman's rlbackup (L). +Unison is a utility that can do two-way, interactive, synchronization. +See L. An external wrapper around +rsync that maintains transfer data to enable two-way synchronization is +drsync; see L. + BackupPC provides many additional features, such as compressed storage, hardlinking any matching files (rather than just files with the same name), -and storing special files without root privileges. But these other scripts -provide simple and effective solutions and are definitely worthy of +and storing special files without root privileges. But these other programs +provide simple, effective and fast solutions and are definitely worthy of consideration. =back @@ -369,7 +383,6 @@ Rsync as a transport method. If you are using smb to backup WinXX machines you need smbclient and nmblookup from the samba package. You will also need nmblookup if you are backing up linux/unix DHCP machines. See L. -Version 2.2.0 or later of Samba is required. Samba versions 3.x are stable and now recommended instead of 2.x. See L for source and binaries. It's pretty easy to @@ -383,18 +396,18 @@ If you are using tar to backup linux/unix machines you should have version 1.13.7 at a minimum, with version 1.13.20 or higher recommended. Use "tar --version" to check your version. Various GNU mirrors have the newest versions of tar, see for example L. -As of June 2003 the latest version is 1.13.25. +As of July 2006 the latest version is 1.15.1. =item * If you are using rsync to backup linux/unix machines you should have -version 2.5.5 or higher on each client machine. See +version 2.6.3 or higher on each client machine. See L. Use "rsync --version" to check your version. For BackupPC to use Rsync you will also need to install the perl File::RsyncP module, which is available from L. -Version 0.52 or later is required. +Version 0.70 or later is required. =item * @@ -468,7 +481,7 @@ be installed with the command: In the future there might be packages for Gentoo and other linux flavors. If the packaged version is older than the released version then you will probably want to install the -lastest version as described below. +latest version as described below. Otherwise, manually fetching and installing BackupPC is easy. Start by downloading the latest version from @@ -495,6 +508,13 @@ To support restore via Zip archives you will need to install Archive::Zip, also from L. You can run "perldoc Archive::Zip" to see if this module is installed. +=item XML::RSS + +To support the RSS feature you will need to install XML::RSS, also from +L. There is not need to install this module if you +don't plan on using RSS. You can run "perldoc XML::RSS" to see if this +module is installed. + =item File::RsyncP To use rsync and rsyncd with BackupPC you will need to install File::RsyncP. @@ -507,8 +527,8 @@ Version 0.52 or later is required. To build and install these packages, fetch the tar.gz file and then run these commands: - tar zxvf Archive-Zip-1.01.tar.gz - cd Archive-Zip-1.01 + tar zxvf Archive-Zip-1.16.tar.gz + cd Archive-Zip-1.16 perl Makefile.PL make make test @@ -529,17 +549,17 @@ the form BackupPC-__VERSION__plN.diff -where N is the patch level, eg: pl5 is patch-level 5. These +where N is the patch level, eg: pl2 is patch-level 2. 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-__VERSION__pl5.diff, you should apply +available, eg: BackupPC-__VERSION__pl2.diff, you should apply the patch after extracting the tar file: # fetch BackupPC-__VERSION__.tar.gz - # fetch BackupPC-__VERSION__pl5.diff + # fetch BackupPC-__VERSION__pl2.diff tar zxf BackupPC-__VERSION__.tar.gz cd BackupPC-__VERSION__ - patch -p0 < ../BackupPC-__VERSION__pl5.diff + patch -p0 < ../BackupPC-__VERSION__pl2.diff perl configure.pl A patch file includes comments that describe that bug fixes @@ -552,9 +572,21 @@ read with perldoc: perldoc configure.pl +Starting with BackupPC 3.0.0, the configure.pl script by default +complies with the file system hierarchy conventions. The major +difference compared to earlier versions is that by default +configuration files will be stored in /etc/BackupPC +rather than below the data directory, __TOPDIR__/conf, +and the log files will be stored in /var/log/BackupPC. +rather than below the data directory, __TOPDIR__/log. + +If you are upgrading from an earlier version the configure.pl script +will keep the configuration files and log files in their original +location. + When you run configure.pl you will be prompted for the full paths of various executables, and you will be prompted for the following -information: +information. =over 4 @@ -569,16 +601,15 @@ sure the BackupPC user's group is chosen restrictively. On this installation, this is __BACKUPPCUSER__. -For security purposes you might choose to configre the BackupPC +For security purposes you might choose to configure the BackupPC user with the shell set to /bin/false. Since you might need to run some BackupPC programs as the BackupPC user for testing purposes, you can use the -s option to su to explicitly run a shell, eg: su -s /bin/bash __BACKUPPCUSER__ - -Depending upon your configuration you might also need -the -l option. + +Depending upon your configuration you might also need the -l option. =item Data Directory @@ -590,14 +621,14 @@ On this installation, this is __TOPDIR__. =item Install Directory You should decide where the BackupPC scripts, libraries and documentation -should be installed, eg: /opt/local/BackupPC. +should be installed, eg: /usr/local/BackupPC. On this installation, this is __INSTALLDIR__. =item CGI bin Directory You should decide where the BackupPC CGI script resides. This will -usually below Apache's cgi-bin directory. +usually be below Apache's cgi-bin directory. On this installation, this is __CGIDIR__. @@ -607,12 +638,25 @@ A directory where BackupPC's images are stored so that Apache can serve them. This should be somewhere under Apache's DocumentRoot directory. +=item Config and Log directories + +In this installation the configuration and log directories are +located in the following locations: + + __CONFDIR__/config.pl main config file + __CONFDIR__/hosts hosts file + __CONFDIR__/pc/HOST.pl per-pc config file + __LOGDIR__/BackupPC log files, pid, status + +The configure.pl script doesn't prompt for these locations but +they can be set for new installations using command-line options. + =back =head2 Step 3: Setting up config.pl After running configure.pl, browse through the config file, -__TOPDIR__/conf/config.pl, and make sure all the default settings +__CONFDIR__/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. @@ -620,7 +664,7 @@ See the section L for more details. =head2 Step 4: Setting up the hosts file -The file __TOPDIR__/conf/hosts contains the list of clients to backup. +The file __CONFDIR__/hosts contains the list of clients to backup. BackupPC reads this file in three cases: =over 4 @@ -720,9 +764,9 @@ Here's a simple example of a hosts file: =head2 Step 5: Client Setup -Two methods for getting backup data from a client are supported: smb and -tar. Smb or rsync are the preferred methods for WinXX clients and rsync or -tar are the preferred methods for linux/unix clients. +Three methods for getting backup data from a client are supported: smb, +tar and rsync. Smb or rsync are the preferred methods for WinXX clients +and rsync or tar are the preferred methods for linux/unix/MacOSX clients. The transfer method is set using the $Conf{XferMethod} configuration setting. If you have a mixed environment (ie: you will use smb for some @@ -815,16 +859,17 @@ is not world (other) readable. =item * As a configuration variable $Conf{SmbSharePasswd} in -__TOPDIR__/conf/config.pl. If you put the password +__CONFDIR__/config.pl. If you put the password here you must make sure this file is not world (other) readable. =item * As a configuration variable $Conf{SmbSharePasswd} in the per-PC -configuration file, __TOPDIR__/pc/$host/config.pl. You will have to -use this option if the smb share password is different for each host. -If you put the password here you must make sure this file is not -world (other) readable. +configuration file (__CONFDIR__/pc/$host.pl or +__TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). +You will have to use this option if the smb share password is different +for each host. If you put the password here you must make sure this file +is not world (other) readable. =back @@ -890,8 +935,8 @@ $Conf{TarIncrArgs}, and $Conf{TarClientRestoreCmd}. =item rsync -You should have at least rsync 2.5.5, and the latest version 2.5.6 -is recommended. Rsync is run on the remote client via rsh or ssh. +You should have at least rsync 2.6.3, and the latest version is +recommended. Rsync is run on the remote client via rsh or ssh. The relevant configuration settings are $Conf{RsyncClientPath}, $Conf{RsyncClientCmd}, $Conf{RsyncClientRestoreCmd}, $Conf{RsyncShareName}, @@ -899,8 +944,8 @@ $Conf{RsyncArgs}, and $Conf{RsyncRestoreArgs}. =item rsyncd -You should have at least rsync 2.5.5, and the latest version 2.6.2 -is recommended. In this case the rsync daemon should be running on +You should have at least rsync 2.6.3, and the latest version is +recommended. In this case the rsync daemon should be running on the client machine and BackupPC connects directly to it. The relevant configuration settings are $Conf{RsyncdClientPort}, @@ -948,11 +993,14 @@ for a password. There are two common versions of ssh: v1 and v2. Here are some instructions for one way to setup ssh. (Check which version of SSH you have by typing "ssh" or "man ssh".) -=item Mac OS X +=item MacOSX In general this should be similar to Linux/Unix machines. -Mark Stosberg reports that you can also use hfstar. -See L. +In versions 10.4 and later, the native MacOSX tar works, +and also supports resource forks. xtar is another option, +and rsync works too (although the MacOSX-supplied rsync +has an extension for extended attributes that is not +compatible with standard rsync). =item SSH Setup @@ -1015,7 +1063,7 @@ as user __BACKUPPCUSER__. The -d option tells BackupPC to run as a daemon (ie: it does an additional fork). Any immediate errors will be printed to stderr and BackupPC will quit. -Otherwise, look in __TOPDIR__/log/LOG and verify that BackupPC reports +Otherwise, look in __LOGDIR__/LOG and verify that BackupPC reports it has started and all is ok. =head2 Step 7: Talking to BackupPC @@ -1033,7 +1081,7 @@ configured with /bin/false as the shell, you can use the -s option to su to explicitly run a shell, eg: su -s /bin/bash __BACKUPPCUSER__ - + Depending upon your configuration you might also need the -l option. @@ -1053,7 +1101,7 @@ then all is ok. The jobs status should initially show just BackupPC_trashClean. The hosts status should produce a list of every host you have listed -in __TOPDIR__/conf/hosts as part of a big cryptic output line. +in __CONFDIR__/hosts as part of a big cryptic output line. You can also request that all hosts be queued: @@ -1063,7 +1111,30 @@ At this point you should make sure the CGI interface works since it will be much easier to see what is going on. That's our next subject. -=head2 Step 8: CGI interface +=head2 Step 8: Checking email delivery + +The script BackupPC_sendEmail sends status and error emails to +the administrator and users. It is usually run each night +by BackupPC_nightly. + +To verify that it can run sendmail and deliver email correctly +you should ask it to send a test email to you: + + su __BACKUPPCUSER__ + __INSTALLDIR__/bin/BackupPC_sendEmail -u MYNAME@MYDOMAIN.COM + +BackupPC_sendEmail also takes a -c option that checks if BackupPC +is running, and it sends an email to $Conf{EMailAdminUserName} +if it is not. That can be used as a keep-alive check by adding + + __INSTALLDIR__/bin/BackupPC_sendEmail -c + +to __BACKUPPCUSER__'s cron. + +The -t option to BackupPC_sendEmail causes it to print the email +message instead of invoking sendmail to deliver the message. + +=head2 Step 9: CGI interface The CGI interface script, BackupPC_Admin, is a powerful and flexible way to see and control what BackupPC is doing. It is written for an @@ -1385,122 +1456,12 @@ The backup data directories contain large numbers of hardlinks. If you try to copy the pool the target directory will occupy a lot more space if the hardlinks aren't re-established. -The GNU cp program with the -a option is aware of hardlinks and knows -to re-establish them. So GNU cp -a is the recommended way to copy -the data directory and pool. Don't forget to stop BackupPC while -the copy runs. - -=item Compressing an existing pool - -If you are upgrading BackupPC and want to turn compression on you have -two choices: - -=over 4 - -=item * - -Simply turn on compression. All new backups will be compressed. Both old -(uncompressed) and new (compressed) backups can be browsed and viewed. -Eventually, the old backups will expire and all the pool data will be -compressed. However, until the old backups expire, this approach could -require 60% or more additional pool storage space to store both -uncompressed and compressed versions of the backup files. - -=item * - -Convert all the uncompressed pool files and backups to compressed. -The script __INSTALLDIR__/bin/BackupPC_compressPool does this. -BackupPC must not be running when you run BackupPC_compressPool. -Also, there must be no existing compressed backups when you -run BackupPC_compressPool. - -BackupPC_compressPool compresses all the files in the uncompressed pool -(__TOPDIR__/pool) and moves them to the compressed pool -(__TOPDIR__/cpool). It rewrites the files in place, so that the -existing hardlinks are not disturbed. - -=back - -The rest of this section discusses how to run BackupPC_compressPool. - -BackupPC_compressPool takes three command line options: - -=over 4 - -=item -t - -Test mode: do everything except actually replace the pool files. -Useful for estimating total run time without making any real -changes. - -=item -r - -Read check: re-read the compressed file and compare it against -the original uncompressed file. Can only be used in test mode. - -=item -c # - -Number of children to fork. BackupPC_compressPool can take a long time -to run, so to speed things up it spawns four children, each working on a -different part of the pool. You can change the number of children with -the -c option. - -=back - -Here are the recommended steps for running BackupPC_compressPool: - -=over 4 - -=item * - -Stop BackupPC (eg: "/etc/init.d/backuppc stop"). - -=item * - -Set $Conf{CompressLevel} to a non-zero number (eg: 3). - -=item * - -Do a dry run of BackupPC_compressPool. Make sure you run this as -the BackupPC user (__BACKUPPCUSER__): - - BackupPC_compressPool -t -r - -The -t option (test mode) makes BackupPC_compressPool do all the steps, -but not actually change anything. The -r option re-reads the compressed -file and compares it against the original. - -BackupPC_compressPool gives a status as it completes each 1% of the job. -It also shows the cumulative compression ratio and estimated completion -time. Once you are comfortable that things look ok, you can kill -BackupPC_compressPool or wait for it to finish. - -=item * - -Now you are ready to run BackupPC_compressPool for real. Once again, -as the BackupPC user (__BACKUPPCUSER__), run: - - BackupPC_compressPool - -You should put the output into a file and tail this file. (The running -time could be twice as long as the test mode since the test mode file -writes are immediately followed by an unlink, so in test mode it is -likely the file writes never make it to disk.) - -It is B that BackupPC_compressPool runs to completion before -re-starting BackupPC. Before BackupPC_compressPool completes, none of -the existing backups will be in a consistent state. If you must stop -BackupPC_compressPool for some reason, send it an INT or TERM signal -and give it several seconds (or more) to clean up gracefully. -After that, you can re-run BackupPC_compressPool and it will start -again where it left off. Once again, it is critical that it runs -to 100% completion. - -=back - -After BackupPC_compressPool completes you should have a complete set -of compressed backups (and your disk usage should be lower). You -can now re-start BackupPC. +The best way to copy a pool file system, if possible, is by copying +the raw device at the block level (eg: using dd). Application level +programs that understand hardlinks include the GNU cp program with +the -a option and rsync -H. However, the large number of hardlinks +in the pool will make the memory usage large and the copy very slow. +Don't forget to stop BackupPC while the copy runs. =back @@ -1806,6 +1767,52 @@ The next screen allows you to adjust the parameters for this archive run. Press the "Start the Archive" to start archiving the selected hosts with the parameters displayed. +=head1 Other CGI Functions + +=head2 Configuration and Host Editor + +The CGI interface has a complete configuration and host editor. +Only the administrator can edit the main configuration settings +and hosts. The edit links are in the left navigation bar. + +When changes are made to any parameter a "Save" button appears +at the top of the page. If you are editing a text box you will +need to click outside of the text box to make the Save button +appear. If you don't select Save then the changes won't be saved. + +The host-specific configuration can be edited from the host +summary page using the link in the left navigation bar. +The administrator can edit any of the host-specific +configuration settings. + +When editing the host-specific configuration, each parameter has +an "override" setting that denotes the value is host-specific, +meaning that it overrides the setting in the main configuration. +If you unselect "override" then the setting is removed from +the host-specific configuration, and the main configuration +file is displayed. + +User's can edit their host-specific configuration if enabled +via $Conf{CgiUserConfigEditEnable}. The specific subset +of configuration settings that a user can edit is specified +with $Conf{CgiUserConfigEdit}. It is recommended to make this +list short as possible (you probably don't want your users saving +dozens of backups) and it is essential that they can't edit any +of the Cmd configuration settings, otherwise they can specify +an arbitrary command that will be executed as the BackupPC +user. + +=head2 RSS + +BackupPC supports a very basic RSS feed. Provided you have the +XML::RSS perl module installed, a URL simular to this will +provide RSS information: + + http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss + +This feature is experimental. The information included will +probably change. + =head1 BackupPC Design =head2 Some design issues @@ -1885,7 +1892,7 @@ a factor of 8 or more overall saving in backup storage. =head2 BackupPC operation BackupPC reads the configuration information from -__TOPDIR__/conf/config.pl. It then runs and manages all the backup +__CONFDIR__/config.pl. It then runs and manages all the backup activity. It maintains queues of pending backup requests, user backup requests and administrative commands. Based on the configuration various requests will be executed simultaneously. @@ -2004,18 +2011,17 @@ BackupPC_trashClean is always run in the background to remove any expired backups. Every 5 minutes it wakes up and removes all the files in __TOPDIR__/trash. -Also, once each night, BackupPC_nightly is run to complete some additional -administrative tasks, such as cleaning the pool. This involves removing -any files in the pool that only have a single hard link (meaning no backups -are using that file). Again, to avoid race conditions, BackupPC_nightly -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 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. +Also, once each night, BackupPC_nightly is run to complete some +additional administrative tasks, such as cleaning the pool. This +involves removing any files in the pool that only have a single +hard link (meaning no backups are using that file). Again, to +avoid race conditions, BackupPC_nightly is only run when there +are no BackupPC_link processes running. When BackupPC_nightly is +run no new BackupPC_link jobs are 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 @@ -2025,7 +2031,7 @@ user-initiated backup or backup cancel requests. =head2 Storage layout -BackupPC resides in three directories: +BackupPC resides in several directories: =over 4 @@ -2039,20 +2045,12 @@ is in __INSTALLDIR__/doc. The CGI script BackupPC_Admin resides in this cgi binary directory. -=item __TOPDIR__ +=item __CONFDIR__ -All of BackupPC's data (PC backup images, logs, configuration information) -is stored below this directory. +All the configuration information resides below __CONFDIR__. +This directory contains: -=back - -Below __TOPDIR__ are several directories: - -=over 4 - -=item __TOPDIR__/conf - -The directory __TOPDIR__/conf contains: +The directory __CONFDIR__ contains: =over 4 @@ -2065,11 +2063,21 @@ below for more details. Hosts file, which lists all the PCs to backup. +=item pc + +The directory __CONFDIR__/pc contains per-client configuration files +that override settings in the main configuration file. Each file +is named __CONFDIR__/pc/HOST.pl, where HOST is the host name. + +In pre-FHS versions of BackupPC these files were located in +__TOPDIR__/pc/HOST/config.pl. + =back -=item __TOPDIR__/log +=item __LOGDIR__ -The directory __TOPDIR__/log contains: +The directory __LOGDIR__ (__TOPDIR__/log on pre-FHS versions +of BackupPC) contains: =over 4 @@ -2099,6 +2107,17 @@ last email was sent. Should not be edited. =back +=item __TOPDIR__ + +All of BackupPC's data (PC backup images, logs, configuration information) +is stored below this directory. + +=back + +Below __TOPDIR__ are several directories: + +=over 4 + =item __TOPDIR__/trash Any directories and files below this directory are periodically deleted @@ -2177,10 +2196,12 @@ following files: Current log file for this PC from BackupPC_dump. -=item LOG.0 or LOG.0.z +=item LOG.DDMMYYYY or LOG.DDMMYYYY.z Last month's log file. Log files are aged monthly and compressed (if compression is enabled), and old LOG files are deleted. +In earlier versions of BackupPC these files used to have +a suffix of 0, 1, .... =item XferERR or XferERR.z @@ -2230,8 +2251,10 @@ to the backup or restore number.) =item config.pl -Optional configuration settings specific to this host. Settings in this -file override the main configuration file. +Old location of optional configuration settings specific to this host. +Settings in this file override the main configuration file. +In new versions of BackupPC the per-host configuration files are +stored in __CONFDIR__/pc/HOST.pl. =item backups @@ -2642,8 +2665,9 @@ discussion of some of various security issues. =head1 Configuration File -The BackupPC configuration file resides in __TOPDIR__/conf/config.pl. -Optional per-PC configuration files reside in __TOPDIR__/pc/$host/config.pl. +The BackupPC configuration file resides in __CONFDIR__/config.pl. +Optional per-PC configuration files reside in __CONFDIR__/pc/$host.pl +(or __TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC). This file can be used to override settings just for a particular PC. =head2 Modifying the main configuration file @@ -2683,48 +2707,10 @@ LOG file, so you can tail it (or view it via the CGI interface) to make sure your kill -HUP worked. Errors in parsing the configuration file are also reported in the LOG file. -The optional per-PC configuration file (__TOPDIR__/pc/$host/config.pl) +The optional per-PC configuration file (__CONFDIR__/pc/$host.pl or +__TOPDIR__/pc/$host/config.pl in non-FHS versions of BackupPC) is read whenever it is needed by BackupPC_dump, BackupPC_link and others. -=head2 Configuration file includes - -If you have a heterogeneous set of clients (eg: a variety of WinXX and -linux/unix machines) you will need to create host-specific config.pl files -for some or all of these machines to customize the default settings from -the master config.pl file (at a minimum to set $Conf{XferMethod}). - -Since the config.pl file is just regular perl code, you can include -one config file from another. For example, imagine you had three general -classes of machines: WinXX desktops, linux machines in the DMZ and -linux desktops. You could create three config files in __TOPDIR__/conf: - - __TOPDIR__/conf/ConfigWinDesktop.pl - __TOPDIR__/conf/ConfigLinuxDMZ.pl - __TOPDIR__/conf/ConfigLinuxDesktop.pl - -From each client's directory you can either add a symbolic link to -the appropriate config file: - - cd __TOPDIR__/pc/$host - ln -s ../../conf/ConfigWinDesktop.pl config.pl - -or, better yet, create a config.pl file in __TOPDIR__/pc/$host -that includes the default config.pl file using perl's "do" -command: - - do "__TOPDIR__/conf/ConfigWinDesktop.pl"; - -This alternative allows you to set other configuration options -specific to each host after the "do" command (perhaps even -overriding the settings in the included file). - -Note that you could also include snippets of configuration settings -from the main configuration file. However, be aware that the -modification-time checking that BackupPC does only applies to the -main configuration file: if you change one of the included files, -BackupPC won't notice. You will need to either touch the main -configuration file too, or send BackupPC a HUP (-1) signal. - =head1 Configuration Parameters The configuration parameters are divided into five general groups. @@ -2760,7 +2746,7 @@ See L. =head1 Copyright -Copyright (C) 2001-2005 Craig Barratt +Copyright (C) 2001-2006 Craig Barratt =head1 Credits @@ -2796,6 +2782,8 @@ with some tweaks from Guus Houtzager. Reginaldo Ferreira provided the Portuguese Brazillian translation pt_br.pm for v2.2.0. +Rich Duzenbury provided the RSS feed option to the CGI interface. + Many people have reported bugs, made useful suggestions and helped with testing; see the ChangeLog and the mail lists. diff --git a/images/icon-hardlink.gif b/images/icon-hardlink.gif new file mode 100644 index 0000000000000000000000000000000000000000..02562c42d71d267ff335d717980c2c7229bdaedd GIT binary patch literal 458 zcmZ?wbhEHblxL7;xT?jlfB%g7`uc{3wEqPK|KGnqfByV`0f8AaiVQ$N?Z1M;|Mlzt z-@kwQ^o;-e_y6zjPe@1*5a9hk9|-Eh!kl}0a{BxG|2sI;)WrV}2vAUvJa=yP`}g|- z0s`K@e_v1#DIg%w-(RGwtGs{zeg_aR{?EYh|38oblBXdIAe(HU_>+Z^fkBHw2V?@s zPYi6&9i|p|=t%XSP-HopV>SOwV9-;?4xyE6%1-NgPGl8GZGJRs`z)qQO{+|#o_>~` z>XOL!W5*nCcQ>zwhU&Chch%vvJYlMVi90 zo+=EpqnH?1u3n?LZbNlIK)ma!g-cX5)DIlwKd7?PML==e!Gml(2adWkGMzfDt|or| znDeD82U*nAxYaMX-PyPOpb*ysH8z$fu8i_mnBP3$dVkAFxxHvV-vgBzZgao+Ty>{j s@iL?-Id4-|-tfaZ@I2#&H2z)@g@YRxACJG { @@ -713,9 +714,10 @@ EOF $bpc->ServerConnect(); if ( $mesg ne "" ) { (my $mesgBR = $mesg) =~ s/\n/
\n/g; - $content .= <$mesgBR -EOF + # uncomment this if you want the changes to be displayed +# $content .= <$mesgBR +#EOF foreach my $str ( split(/\n/, $mesg) ) { $bpc->ServerMesg("log $str") if ( $str ne "" ); } @@ -841,8 +843,9 @@ EOF # foreach my $var ( keys(%In) ) { next if ( $var !~ /^orig_z_/ ); + my $val = decode_utf8($In{$var}); $contentHidden .= < + EOF } } @@ -946,7 +949,7 @@ sub fieldEditBuild $size = $type->{size} if ( defined($type->{size}) ); # - # These fragments allow inline conent to be turned on and off + # These fragments allow inline content to be turned on and off # # # $varName @@ -1205,7 +1208,7 @@ EOF } my $textType = ($varName =~ /Passwd/) ? "password" : "text"; $content .= < + EOF } elsif ( $type->{type} eq "boolean" ) { # checkbox @@ -1227,7 +1230,7 @@ EOF my $rowCnt = $varValue =~ tr/\n//; $rowCnt = 1 if ( $rowCnt < 1 ); $content .= <${EscHTML($varValue)} + EOF } $content .= "\n"; @@ -1412,7 +1415,7 @@ sub fieldInputParse } } } else { - $$value = $In{"v_z_$varName"}; + $$value = decode_utf8($In{"v_z_$varName"}); $$value =~ s/\r\n/\n/g; } $$value = undef if ( $type->{undefIfEmpty} && $$value eq "" ); @@ -1465,12 +1468,15 @@ sub configDiffMesg (my $valueNew2 = $valueNew) =~ s/['\n\r]//g; (my $valueOld2 = $valueOld) =~ s/['\n\r]//g; + + next if ( $valueOld2 eq $valueNew2 ); + $valueNew =~ s/\n/\\n/g; $valueOld =~ s/\n/\\n/g; $valueNew =~ s/\r/\\r/g; $valueOld =~ s/\r/\\r/g; - $mesg .= eval("qq($Lang->{CfgEdit_Log_Change_param_value})") - if ( $valueOld2 ne $valueNew2 ); + + $mesg .= eval("qq($Lang->{CfgEdit_Log_Change_param_value})"); } } return $mesg; diff --git a/lib/BackupPC/CGI/EmailSummary.pm b/lib/BackupPC/CGI/EmailSummary.pm index 806f740..1b0fcf5 100644 --- a/lib/BackupPC/CGI/EmailSummary.pm +++ b/lib/BackupPC/CGI/EmailSummary.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/GeneralInfo.pm b/lib/BackupPC/CGI/GeneralInfo.pm index 472cb1b..927b97d 100644 --- a/lib/BackupPC/CGI/GeneralInfo.pm +++ b/lib/BackupPC/CGI/GeneralInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/HostInfo.pm b/lib/BackupPC/CGI/HostInfo.pm index 127b88f..583afa0 100644 --- a/lib/BackupPC/CGI/HostInfo.pm +++ b/lib/BackupPC/CGI/HostInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -347,11 +347,13 @@ EOF if ( @Backups ) { # only allow incremental if there are already some backups $startIncrStr = < + EOF } - $startIncrStr = eval ("qq{$startIncrStr}"); + $startIncrStr = eval("qq{$startIncrStr}"); my $content = eval("qq{$Lang->{Host__host_Backup_Summary2}}"); Header(eval("qq{$Lang->{Host__host_Backup_Summary}}"), $content); Trailer(); diff --git a/lib/BackupPC/CGI/LOGlist.pm b/lib/BackupPC/CGI/LOGlist.pm index f717a84..a728c01 100644 --- a/lib/BackupPC/CGI/LOGlist.pm +++ b/lib/BackupPC/CGI/LOGlist.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Lib.pm b/lib/BackupPC/CGI/Lib.pm index d6dc53f..502a83c 100644 --- a/lib/BackupPC/CGI/Lib.pm +++ b/lib/BackupPC/CGI/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -123,10 +123,11 @@ sub NewRequest # $MyURL = $ENV{SCRIPT_NAME}; $User = $ENV{REMOTE_USER}; + # - # Handle LDAP uid=user when using mod_authz_ldap + # Handle LDAP uid=user when using mod_authz_ldap and otherwise untaint # - $User = $1 if ( $User =~ /uid=([^,]+)/i ); + $User = $1 if ( $User =~ /uid=([^,]+)/i || $User =~ /(.*)/ ); # # Clean up %ENV for taint checking @@ -492,8 +493,8 @@ EOF EOF my $hostSelectbox = ""; my @hosts = GetUserHosts($Conf{CgiNavBarAdminAllHosts}); + NavSectionTitle($Lang->{Hosts}); if ( defined($Hosts) && %$Hosts > 0 && @hosts ) { - NavSectionTitle($Lang->{Hosts}); foreach my $host ( @hosts ) { NavLink("?host=${EscURI($host)}", $host) if ( @hosts < $Conf{CgiNavBarAdminAllHosts} ); diff --git a/lib/BackupPC/CGI/Queue.pm b/lib/BackupPC/CGI/Queue.pm index a6e6294..b516acd 100644 --- a/lib/BackupPC/CGI/Queue.pm +++ b/lib/BackupPC/CGI/Queue.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/RSS.pm b/lib/BackupPC/CGI/RSS.pm index 3c377fe..61eeee4 100644 --- a/lib/BackupPC/CGI/RSS.pm +++ b/lib/BackupPC/CGI/RSS.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/ReloadServer.pm b/lib/BackupPC/CGI/ReloadServer.pm index 97d027d..5e5dc2a 100644 --- a/lib/BackupPC/CGI/ReloadServer.pm +++ b/lib/BackupPC/CGI/ReloadServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm index 9c6a66b..1f8a900 100644 --- a/lib/BackupPC/CGI/Restore.pm +++ b/lib/BackupPC/CGI/Restore.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/RestoreFile.pm b/lib/BackupPC/CGI/RestoreFile.pm index 74501c8..dfce7ef 100644 --- a/lib/BackupPC/CGI/RestoreFile.pm +++ b/lib/BackupPC/CGI/RestoreFile.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm index 587cf4e..b092563 100644 --- a/lib/BackupPC/CGI/RestoreInfo.pm +++ b/lib/BackupPC/CGI/RestoreInfo.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/StartServer.pm b/lib/BackupPC/CGI/StartServer.pm index 3b0947e..2fe216d 100644 --- a/lib/BackupPC/CGI/StartServer.pm +++ b/lib/BackupPC/CGI/StartServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/StartStopBackup.pm b/lib/BackupPC/CGI/StartStopBackup.pm index 8e2f6a6..80f2df1 100644 --- a/lib/BackupPC/CGI/StartStopBackup.pm +++ b/lib/BackupPC/CGI/StartStopBackup.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -43,9 +43,9 @@ sub action { my($str, $reply); - my $start = 1 if ( $In{action} eq $Lang->{Start_Incr_Backup} - || $In{action} eq $Lang->{Start_Full_Backup} ); - my $doFull = $In{action} eq $Lang->{Start_Full_Backup} ? 1 : 0; + my $start = 1 if ( $In{action} eq "Start_Incr_Backup" + || $In{action} eq "Start_Full_Backup" ); + my $doFull = $In{action} eq "Start_Full_Backup" ? 1 : 0; my $type = $doFull ? $Lang->{Type_full} : $Lang->{Type_incr}; my $host = $In{host}; my $Privileged = CheckPermission($host); @@ -82,7 +82,8 @@ sub action my $checkHost = $host; $checkHost = $Conf{ClientNameAlias} if ( $Conf{ClientNameAlias} ne "" ); - my $ipAddr = ConfirmIPAddress($checkHost); + my $ipAddr = ConfirmIPAddress($checkHost); + my $buttonText = $Lang->{$In{action}}; my $content = eval("qq{$Lang->{Are_you_sure_start}}"); Header(eval("qq{$Lang->{BackupPC__Start_Backup_Confirm_on__host}}"),$content); } else { @@ -92,6 +93,7 @@ sub action $backoff = sprintf("%.1f", ($StatusHost{backoffTime} - time) / 3600); } + my $buttonText = $Lang->{$In{action}}; my $content = eval ("qq{$Lang->{Are_you_sure_stop}}"); Header(eval("qq{$Lang->{BackupPC__Stop_Backup_Confirm_on__host}}"), $content); diff --git a/lib/BackupPC/CGI/StopServer.pm b/lib/BackupPC/CGI/StopServer.pm index 6fb171d..b828c50 100644 --- a/lib/BackupPC/CGI/StopServer.pm +++ b/lib/BackupPC/CGI/StopServer.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/Summary.pm b/lib/BackupPC/CGI/Summary.pm index dbf1325..c61538c 100644 --- a/lib/BackupPC/CGI/Summary.pm +++ b/lib/BackupPC/CGI/Summary.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm index 172e0e1..4676684 100644 --- a/lib/BackupPC/CGI/View.pm +++ b/lib/BackupPC/CGI/View.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Config/Meta.pm b/lib/BackupPC/Config/Meta.pm index cdd666d..137f957 100644 --- a/lib/BackupPC/Config/Meta.pm +++ b/lib/BackupPC/Config/Meta.pm @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -281,7 +281,7 @@ use vars qw(%ConfigMeta); RestorePostUserCmd => {type => "string", undefIfEmpty => 1}, ArchivePreUserCmd => {type => "string", undefIfEmpty => 1}, ArchivePostUserCmd => {type => "string", undefIfEmpty => 1}, - UserCmdCheckStatus => "integer", + UserCmdCheckStatus => "boolean", ClientNameAlias => {type => "string", undefIfEmpty => 1}, @@ -365,6 +365,7 @@ use vars qw(%ConfigMeta); IncrKeepCnt => "boolean", IncrKeepCntMin => "boolean", IncrAgeMax => "boolean", + IncrLevels => "boolean", PartialAgeMax => "boolean", IncrFill => "boolean", RestoreInfoKeepCnt => "boolean", @@ -420,6 +421,7 @@ use vars qw(%ConfigMeta); ArchivePostUserCmd => "boolean", DumpPostShareCmd => "boolean", DumpPreShareCmd => "boolean", + UserCmdCheckStatus => "boolean", EMailNotifyMinDays => "boolean", EMailFromUserName => "boolean", EMailAdminUserName => "boolean", @@ -432,6 +434,7 @@ use vars qw(%ConfigMeta); EMailNotifyOldOutlookDays => "boolean", EMailOutlookBackupSubj => "boolean", EMailOutlookBackupMesg => "boolean", + EMailHeaders => "boolean", }, }, diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm index d920675..ccf3dc0 100644 --- a/lib/BackupPC/FileZIO.pm +++ b/lib/BackupPC/FileZIO.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Lang/de.pm b/lib/BackupPC/Lang/de.pm index 0b68a2d..17a591e 100644 --- a/lib/BackupPC/Lang/de.pm +++ b/lib/BackupPC/Lang/de.pm @@ -1,5 +1,6 @@ #!/bin/perl # +# by Ralph Passgang (30.06.2006 for V3.0.0) # by Ralph Passgang (07.06.2004 for V2.1.0beta3) # by Ralph Passgang (06.05.2004 for V2.1.0beta2) # by Manfred Herrmann (11.03.2004 for V2.1.0beta0) @@ -31,26 +32,28 @@ $Lang{Admin_Options_Page} = < \${h2("Server Steuerung")} -
+ + - -
Server Konfiguration neu laden: +
Server Konfiguration neu laden:
EOF $Lang{Unable_to_connect_to_BackupPC_server} = "Kann keine Verbindung zu dem BackupPC Server herstellen!", "Dieses CGI Script (\$MyURL) kann keine Verbindung zu dem BackupPC" - . " Server auf \$Conf{ServerHost} Port \$Conf{ServerPort} herstellen. Der Fehler" + . " Server auf \$Conf{ServerHost} Port \$Conf{ServerPort} herstellen. Der Fehler" . " war: \$err.", "Möglicherweise ist der BackupPC Server Prozess nicht gestartet oder es besteht ein" - . " Konfigurationsfehler. Bitte teilen Sie diese Fehlermeldung dem Systemadministrator mit."; + . " Konfigurationsfehler. Bitte teilen Sie diese Fehlermeldung dem Systemadministrator mit."; $Lang{Admin_Start_Server} = < @@ -97,7 +100,7 @@ $Lang{BackupPC_Server_Status} = < \$generalInfo -\${h2("Aktuell laufende Aufträge")} +\${h2("Zur Zeit aktive Aufträge")}

@@ -241,7 +244,7 @@ Archivierung der folgenden Computer
Computer
\$paramStr - +
@@ -306,13 +309,16 @@ $Lang{Are_you_sure_start} = < Sie starten ein \$type Backup für \$host. -

+ + Möchten Sie das wirklich tun? - - + +
EOF # -------------------------------- @@ -325,15 +331,18 @@ $Lang{Are_you_sure_stop} = < Sie werden Backups abbrechen bzw. Aufträge löschen für Computer \$host; -
- - + + + + Zusätzlich bitte keine Backups starten für die Dauer von Stunden.

Möchten Sie das wirklich tun? - - + +

EOF @@ -347,9 +356,9 @@ $Lang{BackupPC__Queue_Summary} = "BackupPC: Warteschlangen $Lang{Backup_Queue_Summary} = <
-\${h2("Übersicht Benutzer Aufträge in der Warteschlange")} +\${h2("Übersicht Benutzeraufträge in der Warteschlange")}

-Die folgenden Benutzer Aufträge sind eingereiht: +Die folgenden Benutzeraufträge sind eingereiht:

@@ -361,7 +370,7 @@ Die folgenden Benutzer Auftr \${h2("Übersicht Hintergrund Aufträge in der Warteschlange")}

-Die folgenden Hintergrund Aufträge sind eingereiht: +Die folgenden Hintergrundaufträge sind eingereiht:

Computer
@@ -372,7 +381,7 @@ Die folgenden Hintergrund Auftr

\${h2("Übersicht Kommando Aufträge in der Warteschlange")}

-Die folgenden Kommando Aufträge sind eingereiht: +Die folgenden Kommandoaufträge sind eingereiht:

Computer
@@ -427,14 +436,14 @@ EOF # ------------------------------ -$Lang{Browse_backup__num_for__host} = "BackupPC: Browsen des Backups \$num für Computer \$host"; +$Lang{Browse_backup__num_for__host} = "BackupPC: Durchsuchen des Backups \$num für Computer \$host"; # ------------------------------ -$Lang{Restore_Options_for__host} = "BackupPC: Restore Optionen für \$host"; +$Lang{Restore_Options_for__host} = "BackupPC: Wiederherstellungsoptionen für \$host"; $Lang{Restore_Options_for__host2} = < -Sie haben die folgenden Dateien/Verzeichnisse von der Freigabe \$share aus dem Backup mit der Nnummer #\$num selektiert: +Sie haben die folgenden Dateien/Verzeichnisse von der Freigabe \$share aus dem Backup mit der Nummer #\$num selektiert:
    \$fileListStr
@@ -450,8 +459,8 @@ $Lang{Restore_Options_for__host_Option1} = <

-Warnung: alle aktuell existierenden Dateien/Verzeichnisse die bereits vorhanden sind -werden überschrieben! (Tip: alternativ eine spezielle Freigabe erstellen mit Schreibrecht für den +Warnung: alle aktuell existierenden Dateien/Verzeichnisse, die bereits vorhanden sind, +werden überschrieben! (Tip: Alternativ eine spezielle Freigabe erstellen mit Schreibrecht für den Backup-Benutzer und die wiederhergestellten Dateien/Verzeichnisse durch Stichproben prüfen, ob die beabsichtigte Wiederherstellung korrekt ist.)

@@ -484,7 +493,7 @@ Wiederherstellung korrekt ist.)
- +
Computer
EOF @@ -521,7 +530,7 @@ evtl. die Dateien/Verzeichnisse erneut und lassen sehr gro Kompression (0=aus, 1=schnelle,...,9=höchste)
- + EOF @@ -547,7 +556,7 @@ enth beliebige Dateien entpacken.

Warnung: Abhängig von der Anzahl und Größe der selektierten -Dateien/Verzeichnisse kann die Tar Archiv Datei extrem groß bzw. zu groß werden. Der Download kann +Dateien/Verzeichnisse kann die Tar-Archiv Datei extrem groß bzw. zu groß werden. Der Download kann sehr lange dauern und der Speicherplatz auf Ihrem PC muß ausreichen. Selektieren Sie evtl. die Dateien/Verzeichnisse erneut und lassen sehr große und unnötige Dateien weg.

@@ -561,13 +570,13 @@ evtl. die Dateien/Verzeichnisse erneut und lassen sehr gro \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} (andernfalls enthält die Archiv Datei vollständige Pfade).
- + EOF # ------------------------------ -$Lang{Restore_Confirm_on__host} = "BackupPC: Restore Confirm on \$host"; +$Lang{Restore_Confirm_on__host} = "BackupPC: Bestätigung für die Wiederherstellung auf \$host"; $Lang{Are_you_sure} = < -
+ + \$hiddenStr Wollen Sie das wirklich tun? - - + +
EOF @@ -625,22 +637,27 @@ $Lang{Host__host_Backup_Summary2} = < \${h2("Benutzer Aktionen")}

-

- + + + \$startIncrStr - - + +

\${h2("Backup Übersicht")}

-Klicken Sie auf die Backupnummer um durch Dateien zu browsen und bei Bedarf wiederherzustellen. +Klicken Sie auf die Backupnummer um die Dateien zu durchsuchen und bei Bedarf wiederherzustellen.

- + @@ -719,7 +736,7 @@ Kompressionsergebnisse f

EOF -$Lang{Host__host_Archive_Summary} = "BackupPC: Host \$host Archive Summary"; +$Lang{Host__host_Archive_Summary} = "BackupPC: Host \$host Archiv Übersicht"; $Lang{Host__host_Archive_Summary2} = < @@ -730,11 +747,16 @@ $Lang{Host__host_Archive_Summary2} = < -
+ - - + + + \$ArchiveStr @@ -804,7 +826,7 @@ $Lang{Backup_browse_for__host} = < - +
Backup# Typ Filled ENG Level Level Start Zeitpunkt Dauer/min Alter/Tage
EOF -#$Lang{on} = "on"; +#$Lang{on} = "an"; $Lang{off} = "aus"; $Lang{backupType_full} = "voll"; @@ -1237,9 +1259,8 @@ Andernfalls sollten Sie sicherstellen, da angeschlossen wird. Mit freundlichen Grüßen, -Ihr BackupServer +Ihr BackupPC Server http://backuppc.sourceforge.net -http://www.zipptec.de EOF # No recent backup @@ -1269,9 +1290,8 @@ Festplatte einen crash erleidet oder Dateien durch versehentliches L Virenbefall unbrauchbar werden. Mit freundlichen Grüßen, -Ihr BackupServer +Ihr BackupPC Server http://backuppc.sourceforge.net -http://www.zipptec.de EOF # Old Outlook files @@ -1298,16 +1318,15 @@ Es wird folgendes Vorgehen empfohlen: $CgiURL?host=$host Name und Passwort eingeben und dann 2 mal nacheinander - auf "Starte Backup incrementell" klicken + auf "Starte Backup inkrementell" klicken Klicken Sie auf "Gehe zurück zur ...home page" und beobachten Sie den Status des Backup-Vorgangs (Browser von Zeit zu Zeit aktualisieren). Das sollte je nach Dateigröße nur eine kurze Zeit dauern. Mit freundlichen Grüßen, -Ihr BackupServer +Ihr BackupPC Server http://backuppc.sourceforge.net -http://www.zipptec.de EOF $Lang{howLong_not_been_backed_up} = "Backup nicht erfolgreich"; @@ -1317,7 +1336,7 @@ $Lang{howLong_not_been_backed_up_for_days_days} = "kein Backup seit \$days Tagen # RSS strings (all ENGLISH currently) ####################################################################### $Lang{RSS_Doc_Title} = "BackupPC Server"; -$Lang{RSS_Doc_Description} = "RSS feed for BackupPC"; +$Lang{RSS_Doc_Description} = "RSS Feed für BackupPC"; $Lang{RSS_Host_Summary} = < -Note: Check Override if you want to modify a value specific to this host. +Beachte: Wähle Überschreiben, wenn du einen host spezifischen Wert verändern willst EOF -$Lang{CfgEdit_Button_Save} = "Save"; -$Lang{CfgEdit_Button_Insert} = "Insert"; -$Lang{CfgEdit_Button_Delete} = "Delete"; -$Lang{CfgEdit_Button_Add} = "Add"; -$Lang{CfgEdit_Button_Override} = "Override"; -$Lang{CfgEdit_Button_New_Key} = "New Key"; +$Lang{CfgEdit_Button_Save} = "Speichern"; +$Lang{CfgEdit_Button_Insert} = "Einfügen"; +$Lang{CfgEdit_Button_Delete} = "Löschen"; +$Lang{CfgEdit_Button_Add} = "Hinzufügen"; +$Lang{CfgEdit_Button_Override} = "Überschreiben"; +$Lang{CfgEdit_Button_New_Key} = "Neuer Schlüssel"; $Lang{CfgEdit_Error__must_be_an_integer} - = "Error: \$var must be an integer"; + = "Error: \$var muss eine Zahl sein"; $Lang{CfgEdit_Error__must_be_real_valued_number} - = "Error: \$var must be a real-valued number"; + = "Error: \$var muss eine ganze Zahl sein"; $Lang{CfgEdit_Error__entry__must_be_an_integer} - = "Error: \$var entry \$k must be an integer"; + = "Error: \$var Eintrag \$k muss eine Zahl sein"; $Lang{CfgEdit_Error__entry__must_be_real_valued_number} - = "Error: \$var entry \$k must be a real-valued number"; + = "Error: \$var Eintrag \$k muss eine ganze Zahl sein"; $Lang{CfgEdit_Error__must_be_executable_program} - = "Error: \$var must be a valid executable path"; + = "Error: \$var muss ein gültiger ausführbarer Pfad sein"; $Lang{CfgEdit_Error__must_be_valid_option} - = "Error: \$var must be a valid option"; + = "Error: \$var muss eine gültige Option sein"; $Lang{CfgEdit_Error_Copy_host_does_not_exist} - = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + = "Ursprungs Host \$copyHost existiert nicht; Erstelle den vollen Hostnamen \$fullHost. Lösche den Host wenn das nicht war, was du wolltest."; $Lang{CfgEdit_Log_Copy_host_config} - = "\$User copied config from host \$fromHost to \$host\n"; + = "\$User hat die Konfig von host \$fromHost zu \$host kopiert\n"; $Lang{CfgEdit_Log_Delete_param} - = "\$User deleted \$p from \$conf\n"; + = "\$User hat \$p von \$conf gelöscht\n"; $Lang{CfgEdit_Log_Add_param_value} - = "\$User added \$p to \$conf, set to \$value\n"; + = "\$User hat \$p zu \$conf hinzugefügt und den Wert \$value gegeben\n"; $Lang{CfgEdit_Log_Change_param_value} - = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; + = "\$User änderte \$p in \$conf zu \$valueNew von \$valueOld\n"; $Lang{CfgEdit_Log_Host_Delete} - = "\$User deleted host \$host\n"; + = "\$User hat den Host \$host gelöscht\n"; $Lang{CfgEdit_Log_Host_Change} - = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; + = "\$User Host \$host hat den Schlüssel \$key von \$valueOld zu \$valueNew geändert\n"; $Lang{CfgEdit_Log_Host_Add} - = "\$User added host \$host: \$value\n"; + = "\$User hat den Host \$host: \$value hinzugefügt\n"; #end of lang_de.pm + diff --git a/lib/BackupPC/Lang/en.pm b/lib/BackupPC/Lang/en.pm index 0c92e58..44a0737 100644 --- a/lib/BackupPC/Lang/en.pm +++ b/lib/BackupPC/Lang/en.pm @@ -24,10 +24,12 @@ $Lang{Admin_Options_Page} = < \${h2("Server Control")} -
+ +
@@ -935,7 +957,7 @@ $Lang{Email_Summary} = "BackupPC: eMail # ----------------------------------- # !! ERROR messages !! # ----------------------------------- -$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->new failed: Überprüfen Sie die Apache error_log\n"; +$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->new failed: Überprüfen Sie das Apache error_log\n"; $Lang{Wrong_user__my_userid_is___} = "Falscher Benutzer: Meine userid ist \$>, anstelle \$uid" . "(\$Conf{BackupPCUser})\n"; @@ -948,7 +970,7 @@ $Lang{Unable_to_open__file__configuration_problem} = "kann Datei nicht $Lang{Only_privileged_users_can_view_log_or_config_files} = "Nur berechtigte Benutzer können Log oder Config Dateien einsehen."; $Lang{Only_privileged_users_can_view_log_files} = "Nur berechtigte Benutzer können LOG Dateien einsehen."; $Lang{Only_privileged_users_can_view_email_summaries} = "Nur berechtigte Benutzer können die Email Übersicht einsehen."; -$Lang{Only_privileged_users_can_browse_backup_files} = "Nur berechtigte Benutzer können Backup Dateien browsen" +$Lang{Only_privileged_users_can_browse_backup_files} = "Nur berechtigte Benutzer können Backup Dateien durchsuchen" . " für computer \${EscHTML(\$In{host})}."; $Lang{Empty_host_name} = "Kein Hostname."; $Lang{Directory___EscHTML} = "Verzeichnis \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" @@ -1086,7 +1108,7 @@ $Lang{__time0_to__time1_on__days} = "\$t0 bis \$t1 am \$days"; $Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Backups sind für die nächsten \$hours Stunden deaktiviert. -({Stop_Dequeue_Archive})}&host=\$host\">diese Zeit ändern). +(diese Zeit ändern). EOF $Lang{tryIP} = " und \$StatusHost{dhcpHostIP}"; @@ -1176,7 +1198,7 @@ $Lang{The_directory_is_empty} = <
- -
Reload the server configuration: +
Reload the server configuration:
- Actualizar configuración del servidor: + Actualizar configuración del servidor: - Recharger la configuration: + Recharger la configuration: - Ricarica la configurazione del server: + Ricarica la configurazione del server: - Herlaad de configuratie van de server: + Herlaad de configuratie van de server: EOF -$Lang{Unable_to_connect_to_BackupPC_server} = "Verbinding met de BackupPC server niet mogelijk", - "Dit CGI script (\$MyURL) kan geen verbinding maken met de BackupPC-server" +$Lang{Unable_to_connect_to_BackupPC_server} = "Verbinding met de BackupPC server is mislukt", + "Dit CGI script (\$MyURL) kon geen verbinding maken met de BackupPC-server" . " op \$Conf{ServerHost} poort \$Conf{ServerPort}." . " De foutmelding was: \$err.", "Mogelijk draait de BackupPC server niet of is er een " @@ -70,11 +72,11 @@ $Lang{BackupPC_Server_Status_General_Info}= < Volgende backupsessie start op \$nextWakeupTime.
  • Andere informatie:
      -
    • \$numBgQueue wachtende backupaanvragen sedert laatste geplande wakeup, +
    • \$numBgQueue wachtende backupaanvragen sinds laatste geplande wakeup,
    • \$numUserQueue wachtende backupaanvragen van gebruikers, -
    • \$numCmdQueue wachtende aanvragen op commando, +
    • \$numCmdQueue wachtende opdrachten, \$poolInfo -
    • De backupschijf werd het laatst aangevuld tot \$Info{DUlastValue}% +
    • Het backup filesystem werd recentelijk aangevuld voor \$Info{DUlastValue}% op (\$DUlastTime), het maximum van vandaag is \$Info{DUDailyMax}% (\$DUmaxTime) en het maximum van gisteren was \$Info{DUDailyMaxPrev}%.
    @@ -102,7 +104,7 @@ $Lang{BackupPC_Server_Status} = <

    -\${h2("Mislukkingen die aandacht vragen")} +\${h2("Opgetreden fouten die aandacht vragen")}

    @@ -111,7 +113,7 @@ $Lang{BackupPC_Server_Status} = < Laatste poging - + \$statusStr
    Machine Details Fouttijd Laaste fout (verschillend van 'geen ping')
    Laatste fout (verschillend van 'geen ping')
    EOF @@ -131,9 +133,9 @@ Dit overzicht dateert van \$now. Er zijn \$hostCntGood hosts gebackupt, wat een totaal geeft van:

    • \$fullTot volledige backups met een totale grootte van \${fullSizeTot}GB - (vóór definitief wegschrijven en compressie), + (voor samenvoegen),
    • \$incrTot oplopende backups met een totale grootte van \${incrSizeTot}GB - (vóór definitief wegschrijven en compressie). + (voor samenvoegen).

    @@ -157,11 +159,11 @@ Er zijn \$hostCntNone hosts zonder backup.
    - + - + @@ -208,7 +210,7 @@ Er zijn \$hostCntGood machines gebackupt die een totale grootte vertegenwoordige
    Machine Gebruiker tal Voll. Aantal Voll. Voll.Lftd/dagen Voll.Grootte/GB Snelheid MB/sec tal Incr. Aantal Incr. Incr.Lftd/dagen Status Laatste poging
    - + \$strGood \$checkAllHosts
    Machine Gebruiker grootte backup Backupgrootte
    @@ -219,7 +221,7 @@ EOF $Lang{BackupPC_Archive2} = < \$HostListStr @@ -232,7 +234,7 @@ Klaar om volgende machines te archiveren \$paramStr - +
    @@ -299,13 +301,16 @@ $Lang{Are_you_sure_start} = < Met deze actie start u een \$type backup van machine \$host. -
    + + Wilt u dat nu doen? - - + +
    EOF # -------------------------------- @@ -313,27 +318,30 @@ $Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupPC: Bevestiging de annule # -------------------------------- $Lang{Are_you_sure_stop} = < Met deze actie annuleert u de backup van pc \$host of haalt u de opdracht uit de wachtrij; -
    - - + + + + Start bovendien geen andere backup gedurende uur/uren.

    Wilt u dit nu bevestigen? - - + +

    EOF # -------------------------------- -$Lang{Only_privileged_users_can_view_queues_} = "Enkel bevoorrechte gebruikers kunnen de wachtrij bekijken."; +$Lang{Only_privileged_users_can_view_queues_} = "Enkel gebruikers met bijzondere rechten kunnen de wachtrij bekijken."; # -------------------------------- -$Lang{Only_privileged_users_can_archive} = "Enkel bevoorechte gebruikers kunnen archiveren."; +$Lang{Only_privileged_users_can_archive} = "Enkel gebruikers met bijzondere rechten kunnen archiveren."; # -------------------------------- $Lang{BackupPC__Queue_Summary} = "BackupPC: overzicht wachtrij"; # -------------------------------- @@ -388,7 +396,7 @@ Inhoud van bestand \$file, gewijzigd \$mtimeStr \$comment EOF # -------------------------------- -$Lang{skipped__skipped_lines} = "[ \$skipped lijnen overgeslagen ]\n"; +$Lang{skipped__skipped_lines} = "[ \$skipped regels overgeslagen ]\n"; # -------------------------------- $Lang{_pre___Can_t_open_log_file__file} = "
    \nKan het logbestand \$file niet openen \n";
     
    @@ -423,9 +431,9 @@ EOF
     $Lang{Browse_backup__num_for__host} = "BackupPC: Overzicht backup nummer \$num van pc \$host";
     
     # ------------------------------
    -$Lang{Restore_Options_for__host} = "BackupPC: Opties voor het terugplaatsen van bestanden van machine \$host";
    +$Lang{Restore_Options_for__host} = "BackupPC: Opties voor het herstellen van bestanden van machine \$host";
     $Lang{Restore_Options_for__host2} = <
     U hebt de volgende bestanden/mappen geselecteerd uit
      \$share, backup nummer #\$num:
    @@ -433,15 +441,15 @@ U hebt de volgende bestanden/mappen geselecteerd uit
     \$fileListStr
     
     

    -Er zijn drie mogelijkheden om deze bestanden/mappen terug te plaatsen. +Er zijn drie mogelijkheden om deze bestanden/mappen terug te herstellen. Gelieve een van de onderstaande mogelijkheden te kiezen.

    -\${h2("Optie 1: Rechtstreeks terugplaatsen")} +\${h2("Optie 1: Rechtstreeks herstellen")}

    EOF $Lang{Restore_Options_for__host_Option1} = <

    Waarschuwing: bestaande bestanden met dezelfde naam zullen @@ -476,14 +484,14 @@ overschreven worden! - + EOF $Lang{Restore_Options_for__host_Option1_disabled} = <
    - + EOF @@ -523,7 +531,7 @@ $Lang{Option_2__Download_Zip_archive2} = < \${h2("Optie 2: Download Zip-bestand")}

    -Archive::Zip is niet geïnstalleerd op de backupPC-server en het is +Archive::Zip is niet geïnstalleerd op de backupPC-server en het is dus niet mogelijk om een Zip-bestand te downloaden. Gelieve aan uw systeembeheerder te vragen om Archive::Zip te downloaden van www.cpan.org en te installeren. @@ -554,43 +562,46 @@ schijfruimte te beschikken om het bestand op te slaan. aan \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} (anders zal het tar-archief volledige padnamen bevatten).
    - + EOF # ------------------------------ -$Lang{Restore_Confirm_on__host} = "BackupPC: Bevestig terugplaatsen voor machine \$host"; +$Lang{Restore_Confirm_on__host} = "BackupPC: Bevestig herstellen voor machine \$host"; $Lang{Are_you_sure} = < U hebt gevraagd om bestanden rechtstreeks terug te zetten op de machine \$In{hostDest}. -De volgende bestanden zullen teruggeplaatst worden in share \$In{shareDest}, +De volgende bestanden zullen hersteld worden in share \$In{shareDest}, uit backup nummer \$num:

    - + \$fileListStr
    Oorspronkelijk bestand/mapzal teruggeplaatst worden in
    Oorspronkelijk bestand/mapzal hersteld worden in
    -

    + + \$hiddenStr Is dit wat u wilt doen? Gelieve te bevestigen. - - + +
    EOF # -------------------------- -$Lang{Restore_Requested_on__hostDest} = "BackupPC: Terugplaatsen gevraagd van machine \$hostDest"; +$Lang{Restore_Requested_on__hostDest} = "BackupPC: Herstellen aangevraagd van machine \$hostDest"; $Lang{Reply_from_server_was___reply} = < @@ -610,7 +621,7 @@ EOF $Lang{Host__host_Backup_Summary} = "BackupPC: Overzicht backup van machine \$host"; $Lang{Host__host_Backup_Summary2} = < \$warnStr
      @@ -619,22 +630,27 @@ $Lang{Host__host_Backup_Summary2} = < \${h2("Acties door de gebruiker")}

      -

      - + + + \$startIncrStr - - + +

      -\${h2("Overzicht backup")} +\${h2("Backup overzicht")}

      -Klik op het backupnummer om de inhoud te bekijken of om bestanden terug te plaatsen. +Klik op het backupnummer om de inhoud te bekijken of om bestanden te herstellen.

      - + @@ -675,7 +691,7 @@ Lege bestanden en SMB-fouten worden niet geteld in de aantallen \'hergebruik\' e - + @@ -725,11 +741,16 @@ $Lang{Host__host_Archive_Summary2} = < -
      + - - + + + \$ArchiveStr @@ -799,7 +820,7 @@ $Lang{Backup_browse_for__host} = < - +
      backup nr. Type Aangevuld ENG Level Niveau Startdatum Duurtijd in min. Lftd. in dagen Nieuwe bestanden
      backup nr. Backup nr. Type Aantal best. Grootte in MB
      - +
      @@ -884,7 +905,7 @@ $Lang{Restore___num_details_for__host2} = < Duur \$duration min
      Aantal bestanden \$Restores[\$i]{nFiles}
      Totale grootte \${MB} MB
      Overdrachtsratio \$MBperSec MB/sec
      Overdrachtssnelheid \$MBperSec MB/sec
      TarCreate fouten \$Restores[\$i]{tarCreateErrs}
      Overdrachtsfouten \$Restores[\$i]{xferErrs}
      Logbestand overdracht @@ -896,7 +917,7 @@ $Lang{Restore___num_details_for__host2} = < - + \$fileListStr
      Oorspronkelijk bestand/mapTeruggeplaatst naar
      Oorspronkelijk bestand/maphersteld naar
      EOF @@ -921,7 +942,7 @@ $Lang{Archive___num_details_for__host2 } = <

      -\${h1("Lijst machines")} +\${h1("Machinelijst")}

      @@ -955,20 +976,20 @@ $Lang{Directory___EscHTML} = "Map \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" . " is leeg"; $Lang{Can_t_browse_bad_directory_name2} = "Kan niet bladeren door foutieve mapnaam" . " \${EscHTML(\$relDir)}"; -$Lang{Only_privileged_users_can_restore_backup_files} = "Enkel gebruikers met bijzondere rechten kunnen backupbestanden" - . " van machine \${EscHTML(\$In{host})} terugplaatsen."; +$Lang{Only_privileged_users_can_restore_backup_files} = "Enkel gebruikers met bijzondere rechten kunnen backups" + . " van machine \${EscHTML(\$In{host})} terugzetten."; $Lang{Bad_host_name} = "Foutieve of ongeldige machinenaam \${EscHTML(\$host)}"; $Lang{You_haven_t_selected_any_files__please_go_Back_to} = "U hebt geen enkel bestand geselecteerd. Gelieve terug te gaan en" . " selecteer een of meerdere bestanden."; $Lang{You_haven_t_selected_any_hosts} = "U hebt geen machine geselecteerd. Gelieve terug te gaan om" . " een machine te selecteren."; -$Lang{Nice_try__but_you_can_t_put} = "Goed geprobeerd, maar u kan geen \'..\' in de bestandsnamen plaatsen"; +$Lang{Nice_try__but_you_can_t_put} = "Leuk geprobeerd, maar u kan geen \'..\' in de bestandsnamen plaatsen"; $Lang{Host__doesn_t_exist} = "Machine \${EscHTML(\$In{hostDest})} bestaat niet."; -$Lang{You_don_t_have_permission_to_restore_onto_host} = "U beschikt niet over de juiste rechten om bestanden terug te plaatsen naar machine " +$Lang{You_don_t_have_permission_to_restore_onto_host} = "U beschikt niet over de juiste rechten om bestanden te herstellen naar machine " . " \${EscHTML(\$In{hostDest})}"; $Lang{Can_t_open_create__openPath} = "Ik kan " . "\${EscHTML(\"\$openPath\")} niet openen of aanmaken"; -$Lang{Only_privileged_users_can_restore_backup_files2} = "Alleen gebruikers met bijzondere rechten kunnen bestanden terugplaatsen" +$Lang{Only_privileged_users_can_restore_backup_files2} = "Alleen gebruikers met bijzondere rechten kunnen bestanden herstellen" . " naar machine \${EscHTML(\$host)}."; $Lang{Empty_host_name} = "Lege machinenaam"; $Lang{Unknown_host_or_user} = "Onbekende machine of gebruiker \${EscHTML(\$host)}"; @@ -976,17 +997,17 @@ $Lang{Only_privileged_users_can_view_information_about} = "Enkel gebruikers met . " machine \${EscHTML(\$host)} bekijken." ; $Lang{Only_privileged_users_can_view_archive_information} = "Enkel gebruikers met bijzondere rechten kunnen archiveringsinformatie bekijken."; $Lang{Only_privileged_users_can_view_restore_information} = "Enkel gebruikers met bijzondere rechten kunnen herstelinformatie bekijken."; -$Lang{Restore_number__num_for_host__does_not_exist} = "Terugplaatsing nr.\$num van machine \${EscHTML(\$host)}" +$Lang{Restore_number__num_for_host__does_not_exist} = "Herstel nr.\$num van machine \${EscHTML(\$host)}" . " bestaat niet."; $Lang{Archive_number__num_for_host__does_not_exist} = "Archiveringsnr. \$num van machine \${EscHTML(\$host)}" . " bestaat niet."; -$Lang{Can_t_find_IP_address_for} = "Ik kan het IP-nummer van \${EscHTML(\$host)} niet vinden."; +$Lang{Can_t_find_IP_address_for} = "Ik kan het IP-adres van \${EscHTML(\$host)} niet vinden."; $Lang{host_is_a_DHCP_host} = < -In afwachting dat ik machine \$host op een welbepaald DHCP-adres terugvind, kan u +In afwachting dat ik machine \$host op een bepaald DHCP-adres terugvind, kan u deze aanvraag enkel doen vanaf die machine zelf. EOF @@ -998,7 +1019,7 @@ $Lang{Backup_requested_on_DHCP__host} = "backup aangevraagd van DHCP \$host (\$I . " \$User vanaf \$ENV{REMOTE_ADDR}"; $Lang{Backup_requested_on__host_by__User} = "backup aangevraagd van \$host door \$User"; $Lang{Backup_stopped_dequeued_on__host_by__User} = "backup geannuleerd van \$host door \$User"; -$Lang{Restore_requested_to_host__hostDest__backup___num} = "Terugplaatsing aangevraagd naar machine \$hostDest, backup nr.\$num," +$Lang{Restore_requested_to_host__hostDest__backup___num} = "Herstel aangevraagd voor machine \$hostDest, backup nr.\$num," . " door \$User vanaf \$ENV{REMOTE_ADDR}"; $Lang{Archive_requested} = "Archivering aangevraagd door \$User vanaf \$ENV{REMOTE_ADDR}"; @@ -1087,7 +1108,7 @@ $Lang{__time0_to__time1_on__days} = "\$t0 tot \$t1 op \$days."; $Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <backups zijn \$hours uren uitgesteld -({Stop_Dequeue_Archive})}&host=\$host\">Wijzig dit aantal). +(Wijzig dit aantal). EOF $Lang{tryIP} = " en \$StatusHost{dhcpHostIP}"; @@ -1134,11 +1155,11 @@ $Lang{Visit_this_directory_in_backup} = < -Klik op het terugplaatsingsnummer voor meer details. +Klik op het nummer voor meer details.
      Machinebackup nr.
      - + @@ -1190,24 +1211,24 @@ $Lang{and} = "en"; # ------ # Hosts states and reasons -$Lang{Status_idle} = "in rust"; +$Lang{Status_idle} = "inactief"; $Lang{Status_backup_starting} = "backup start"; $Lang{Status_backup_in_progress} = "backup bezig"; -$Lang{Status_restore_starting} = "terugplaatsen start"; -$Lang{Status_restore_in_progress} = "terugplaatsen bezig"; +$Lang{Status_restore_starting} = "herstel start"; +$Lang{Status_restore_in_progress} = "herstel bezig"; $Lang{Status_link_pending} = "wacht op linken"; $Lang{Status_link_running} = "linken is bezig"; $Lang{Reason_backup_done} = "backup voltooid"; -$Lang{Reason_restore_done} = "terugplaatsen voltooid"; +$Lang{Reason_restore_done} = "herstel voltooid"; $Lang{Reason_archive_done} = "archivering voltooid"; $Lang{Reason_nothing_to_do} = "niets te doen"; $Lang{Reason_backup_failed} = "backup mislukt"; -$Lang{Reason_restore_failed} = "terugplaatsen mislukt"; +$Lang{Reason_restore_failed} = "herstel mislukt"; $Lang{Reason_archive_failed} = "archivering mislukt"; $Lang{Reason_no_ping} = "geen ping"; $Lang{Reason_backup_canceled_by_user} = "backup geannuleerd door gebruiker"; -$Lang{Reason_restore_canceled_by_user} = "terugplaatsen geannuleerd door gebruiker"; +$Lang{Reason_restore_canceled_by_user} = "herstellen geannuleerd door gebruiker"; $Lang{Reason_archive_canceled_by_user} = "archivering geannuleerd door gebruiker"; # --------- @@ -1262,13 +1283,13 @@ is met het netwerk. Als uw pc gedurende geruime tijd (meer dan een paar uur) verbonden was met het netwerk gedurende de laatste $days dagen, kan u het beste contact opnemen van uw systeembeheerder. Vraag hem of haar om uit te -zoeken waarom er geen backups meer genomen worden van uw pc. +zoeken waarom er geen backups meer gemaakt worden van uw pc. Anderzijds, als deze pc of notebook zich momenteel niet in het netwerk bevindt dan kan u hieraan weinig anders doen behalve van belangrijke bestanden handmatig een kopie te maken op een ander medium (CD, diskette, tape, andere pc,...) U dient te weten dat *geen enkel bestand* dat u aanmaakte of wijzigde in de -laatste $days dagen teruggeplaatst zal kunnen worden in geval de harde schijf +laatste $days dagen hersteld zal kunnen worden in geval de harde schijf van uw pc zou crashen. Hierin zijn nieuwe e-mail en bijlagen inbegrepen. @@ -1335,114 +1356,118 @@ Laatste poging: \$host_last_attempt; EOF ####################################################################### -# Configuration editor strings (all ENGLISH currently) +# Configuration editor strings ####################################################################### -$Lang{Only_privileged_users_can_edit_config_files} = "Only privileged users can edit configuation settings."; -$Lang{CfgEdit_Edit_Config} = "Edit Config"; -$Lang{CfgEdit_Edit_Hosts} = "Edit Hosts"; +$Lang{Only_privileged_users_can_edit_config_files} = "Enkel gebruikers met bijzondere rechten kunnen de configuratie wijzigen."; +$Lang{CfgEdit_Edit_Config} = "Wijzig Configuratie"; +$Lang{CfgEdit_Edit_Hosts} = "Wijzig Machines"; $Lang{CfgEdit_Title_Server} = "Server"; -$Lang{CfgEdit_Title_General_Parameters} = "General Parameters"; -$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup Schedule"; -$Lang{CfgEdit_Title_Concurrent_Jobs} = "Concurrent Jobs"; -$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Filesystem Limits"; -$Lang{CfgEdit_Title_Other_Parameters} = "Other Parameters"; -$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Settings"; -$Lang{CfgEdit_Title_Program_Paths} = "Program Paths"; -$Lang{CfgEdit_Title_Install_Paths} = "Install Paths"; +$Lang{CfgEdit_Title_General_Parameters} = "Algemene Parameters"; +$Lang{CfgEdit_Title_Wakeup_Schedule} = "Wakeup planning"; +$Lang{CfgEdit_Title_Concurrent_Jobs} = "Parallelle Jobs"; +$Lang{CfgEdit_Title_Pool_Filesystem_Limits} = "Pool Bestandssysteem Limieten"; +$Lang{CfgEdit_Title_Other_Parameters} = "Andere Parameters"; +$Lang{CfgEdit_Title_Remote_Apache_Settings} = "Remote Apache Instellingen"; +$Lang{CfgEdit_Title_Program_Paths} = "Programmapaden"; +$Lang{CfgEdit_Title_Install_Paths} = "Installatiepaden"; $Lang{CfgEdit_Title_Email} = "Email"; -$Lang{CfgEdit_Title_Email_settings} = "Email settings"; -$Lang{CfgEdit_Title_Email_User_Messages} = "Email User Messages"; +$Lang{CfgEdit_Title_Email_settings} = "Email instellingen"; +$Lang{CfgEdit_Title_Email_User_Messages} = "Emailberichten Gebruikers"; $Lang{CfgEdit_Title_CGI} = "CGI"; -$Lang{CfgEdit_Title_Admin_Privileges} = "Admin Privileges"; -$Lang{CfgEdit_Title_Page_Rendering} = "Page Rendering"; -$Lang{CfgEdit_Title_Paths} = "Paths"; -$Lang{CfgEdit_Title_User_URLs} = "User URLs"; -$Lang{CfgEdit_Title_User_Config_Editing} = "User Config Editing"; -$Lang{CfgEdit_Title_Xfer} = "Xfer"; -$Lang{CfgEdit_Title_Xfer_Settings} = "Xfer Settings"; -$Lang{CfgEdit_Title_Smb_Settings} = "Smb Settings"; -$Lang{CfgEdit_Title_Tar_Settings} = "Tar Settings"; -$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync Settings"; -$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd Settings"; -$Lang{CfgEdit_Title_BackupPCd_Settings} = "BackupPCd Settings"; -$Lang{CfgEdit_Title_Archive_Settings} = "Archive Settings"; -$Lang{CfgEdit_Title_Include_Exclude} = "Include/Exclude"; -$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Paths/Commands"; -$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Paths/Commands"; -$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Paths/Commands/Args"; -$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Port/Args"; -$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archive Paths/Commands"; -$Lang{CfgEdit_Title_Schedule} = "Schedule"; -$Lang{CfgEdit_Title_Full_Backups} = "Full Backups"; -$Lang{CfgEdit_Title_Incremental_Backups} = "Incremental Backups"; +$Lang{CfgEdit_Title_Admin_Privileges} = "Admin rechten"; +$Lang{CfgEdit_Title_Page_Rendering} = "Pagina opbouw"; +$Lang{CfgEdit_Title_Paths} = "Paden"; +$Lang{CfgEdit_Title_User_URLs} = "Gebruiker URLs"; +$Lang{CfgEdit_Title_User_Config_Editing} = "Wijzigen gebruikersconfiguratie"; +$Lang{CfgEdit_Title_Xfer} = "Overdracht"; +$Lang{CfgEdit_Title_Xfer_Settings} = "Overdracht instellingen"; +$Lang{CfgEdit_Title_Smb_Settings} = "Smb instellingen"; +$Lang{CfgEdit_Title_Tar_Settings} = "Tar instellingen"; +$Lang{CfgEdit_Title_Rsync_Settings} = "Rsync instellingen"; +$Lang{CfgEdit_Title_Rsyncd_Settings} = "Rsyncd instellingen"; +$Lang{CfgEdit_Title_BackupPCd_Settings} = "BackupPCd instellingen"; +$Lang{CfgEdit_Title_Archive_Settings} = "Archivering instellingen"; +$Lang{CfgEdit_Title_Include_Exclude} = "Inclusief/Exclusief"; +$Lang{CfgEdit_Title_Smb_Paths_Commands} = "Smb Pad/Opdrachten"; +$Lang{CfgEdit_Title_Tar_Paths_Commands} = "Tar Pad/Opdrachten"; +$Lang{CfgEdit_Title_Rsync_Paths_Commands_Args} = "Rsync Pad/Opdrachten/Parameters"; +$Lang{CfgEdit_Title_Rsyncd_Port_Args} = "Rsyncd Poort/Parameters"; +$Lang{CfgEdit_Title_Archive_Paths_Commands} = "Archivering Pad/Opdrachten"; +$Lang{CfgEdit_Title_Schedule} = "Planning"; +$Lang{CfgEdit_Title_Full_Backups} = "Volledige Backups"; +$Lang{CfgEdit_Title_Incremental_Backups} = "Incrementele Backups"; $Lang{CfgEdit_Title_Blackouts} = "Blackouts"; -$Lang{CfgEdit_Title_Other} = "Other"; -$Lang{CfgEdit_Title_Backup_Settings} = "Backup Settings"; -$Lang{CfgEdit_Title_Client_Lookup} = "Client Lookup"; -$Lang{CfgEdit_Title_Other} = "Other"; -$Lang{CfgEdit_Title_User_Commands} = "User Commands"; -$Lang{CfgEdit_Title_Hosts} = "Hosts"; - -$Lang{CfgEdit_Hosts_Comment} = < -Note: Check Override if you want to modify a value specific to this host. +NB: Selecteer 'Overschrijven' als je een waarde wil wijzigen specifiek voor deze machine. EOF -$Lang{CfgEdit_Button_Save} = "Save"; -$Lang{CfgEdit_Button_Insert} = "Insert"; -$Lang{CfgEdit_Button_Delete} = "Delete"; -$Lang{CfgEdit_Button_Add} = "Add"; -$Lang{CfgEdit_Button_Override} = "Override"; -$Lang{CfgEdit_Button_New_Key} = "New Key"; +$Lang{CfgEdit_Button_Save} = "Bewaren"; +$Lang{CfgEdit_Button_Insert} = "Invoegen"; +$Lang{CfgEdit_Button_Delete} = "Verwijderen"; +$Lang{CfgEdit_Button_Add} = "Toevoegen"; +$Lang{CfgEdit_Button_Override} = "Overschrijven"; +$Lang{CfgEdit_Button_New_Key} = "Nieuwe sleutel"; $Lang{CfgEdit_Error__must_be_an_integer} - = "Error: \$var must be an integer"; + = "Fout: \$var moet een geheel getal zijn"; $Lang{CfgEdit_Error__must_be_real_valued_number} - = "Error: \$var must be a real-valued number"; + = "Fout: \$var moet een reële waarde (nummer) zijn"; $Lang{CfgEdit_Error__entry__must_be_an_integer} - = "Error: \$var entry \$k must be an integer"; + = "Fout: \$var ingang \$k moet een geheel getal zijn"; $Lang{CfgEdit_Error__entry__must_be_real_valued_number} - = "Error: \$var entry \$k must be a real-valued number"; + = "Fout: \$var ingang \$k moet een reële waarde (nummer) zijn"; $Lang{CfgEdit_Error__must_be_executable_program} - = "Error: \$var must be a valid executable path"; + = "Fout: \$var moet een geldig uitvoerbaar pad zijn"; $Lang{CfgEdit_Error__must_be_valid_option} - = "Error: \$var must be a valid option"; + = "Fout: \$var is geen geldige optie"; $Lang{CfgEdit_Error_Copy_host_does_not_exist} - = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; - + = "Te kopiëren machine \$copyHost bestaat niet; Machine \$fullHost wordt aangemaakt. Verwijder deze machine indien dit niet is wat je wil."; + $Lang{CfgEdit_Log_Copy_host_config} - = "\$User copied config from host \$fromHost to \$host\n"; + = "\$User kopieerde de instellingen van machine \$fromHost naar \$host\n"; $Lang{CfgEdit_Log_Delete_param} - = "\$User deleted \$p from \$conf\n"; + = "\$User verwijderde \$p van \$conf\n"; $Lang{CfgEdit_Log_Add_param_value} - = "\$User added \$p to \$conf, set to \$value\n"; + = "\$User voegde \$p toe aan \$conf, met waarde \$value\n"; $Lang{CfgEdit_Log_Change_param_value} - = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; + = "\$User wijzigde \$p in \$conf van \$valueOld naar \$valueNew \n"; $Lang{CfgEdit_Log_Host_Delete} - = "\$User deleted host \$host\n"; + = "\$User verwijderde machine \$host\n"; $Lang{CfgEdit_Log_Host_Change} - = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; + = "\$User machine \$host wijzigde \$key van \$valueOld naar \$valueNew\n"; $Lang{CfgEdit_Log_Host_Add} - = "\$User added host \$host: \$value\n"; + = "\$User voegde machine \$host toe: \$value\n"; #end of lang_nl.pm + diff --git a/lib/BackupPC/Lang/pt_br.pm b/lib/BackupPC/Lang/pt_br.pm index 1f5b10a..0af3258 100644 --- a/lib/BackupPC/Lang/pt_br.pm +++ b/lib/BackupPC/Lang/pt_br.pm @@ -1,7 +1,8 @@ -#!/usr/bin/perl +#!/bin/perl # # By Reginaldo Ferreira (23.07.2004 for V2.1.10) # +# Edited by Rodrigo Real (22.06.2006) #my %lang; @@ -10,10 +11,10 @@ # -------------------------------- $Lang{Start_Archive} = "Iniciar backup"; -$Lang{Stop_Dequeue_Archive} = "Parar/anular backup"; -$Lang{Start_Full_Backup} = "Iniciar Backup Completa"; +$Lang{Stop_Dequeue_Archive} = "Parar/Cancelar backup"; +$Lang{Start_Full_Backup} = "Iniciar Backup Completo"; $Lang{Start_Incr_Backup} = "Iniciar Backup Incremental"; -$Lang{Stop_Dequeue_Backup} = "Parar/Anular Backup"; +$Lang{Stop_Dequeue_Backup} = "Parar/Cancelar Backup"; $Lang{Restore} = "Restaurar"; $Lang{Type_full} = "completo"; @@ -28,14 +29,16 @@ $Lang{Admin_Options_Page} = < \${h2("Controle do Servidor")} -
      + +
      Terugplaatsing nr.
      Herstel nr. Resultaat Startdatum Duur(min.)
      - -
      Atualizar configurações do servidor: +
      Atualizar configurações do servidor:
      -Hay \$hostCntGood hosts que possuem backup com tamanho total de \${fullSizeTot}GB +Existem \$hostCntGood hosts que possuem backup com tamanho total de \${fullSizeTot}GB

      @@ -236,7 +239,7 @@ Sobre o Backup dos seguintes Hosts \$paramStr - +
      @@ -302,13 +305,16 @@ $Lang{Are_you_sure_start} = < Iniciando Backup \$type em \$host. -
      + + Tem certeza desta ação? - - + +
      EOF # -------------------------------- @@ -321,15 +327,18 @@ $Lang{Are_you_sure_stop} = < Você está certo de parar/sair da fila de backup em \$host; -
      - - + + + + Assim mesmo, por favor não impessa outro backup durante horas.

      Tem certeza de que quer fazer isto? - - + +

      EOF @@ -479,7 +488,7 @@ selecionado ser - + EOF @@ -516,7 +525,7 @@ a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} Compressão (0=desativada, 1=rápida,...,9=máxima)
      - + EOF @@ -557,7 +566,7 @@ local para armazen relativo a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} (caso contrário o arquivo conterá os caminhos completos).
      - + EOF @@ -577,17 +586,20 @@ do Backup n \$fileListStr -
      + + \$hiddenStr Tem certeza? - - + +
      EOF @@ -621,11 +633,16 @@ $Lang{Host__host_Backup_Summary2} = < \${h2("Ações do Usuário")}

      -

      - + + + \$startIncrStr - - + +

      \${h2("Resumo do Backup")} @@ -728,11 +745,16 @@ $Lang{Host__host_Archive_Summary2} = < -
      + - - + + +
      \$ArchiveStr @@ -802,7 +824,7 @@ $Lang{Backup_browse_for__host} = < - +
      @@ -1088,7 +1110,7 @@ $Lang{__time0_to__time1_on__days} = "\$t0 at $Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Os backups atrazaram-se durante \$hours hours -({Stop_Dequeue_Archive})}&host=\$host\">Troque este número). +(Troque este número). EOF $Lang{tryIP} = " y \$StatusHost{dhcpHostIP}"; @@ -1311,8 +1333,8 @@ $Lang{howLong_not_been_backed_up_for_days_days} = "n ####################################################################### # RSS strings ####################################################################### -$Lang{RSS_Doc_Title} = "BackupPC Server"; -$Lang{RSS_Doc_Description} = "RSS feed for BackupPC"; +$Lang{RSS_Doc_Title} = "Servidor BackupPC"; +$Lang{RSS_Doc_Description} = "RSS feed do BackupPC"; $Lang{RSS_Host_Summary} = < -Note: Check Override if you want to modify a value specific to this host. +Note: Marque Override se você quiser modificar um valor especificamente neste host. EOF -$Lang{CfgEdit_Button_Save} = "Save"; -$Lang{CfgEdit_Button_Insert} = "Insert"; -$Lang{CfgEdit_Button_Delete} = "Delete"; -$Lang{CfgEdit_Button_Add} = "Add"; -$Lang{CfgEdit_Button_Override} = "Override"; +$Lang{CfgEdit_Button_Save} = "Salvar"; +$Lang{CfgEdit_Button_Insert} = "Inserir"; +$Lang{CfgEdit_Button_Delete} = "Excluir"; +$Lang{CfgEdit_Button_Add} = "Adicionar"; +$Lang{CfgEdit_Button_Override} = "Sobrepor"; $Lang{CfgEdit_Button_New_Key} = "New Key"; $Lang{CfgEdit_Error__must_be_an_integer} - = "Error: \$var must be an integer"; + = "Erro: \$var precisa ser um inteiro"; $Lang{CfgEdit_Error__must_be_real_valued_number} - = "Error: \$var must be a real-valued number"; + = "Erro: \$var precisa ser um número com valor-real"; $Lang{CfgEdit_Error__entry__must_be_an_integer} - = "Error: \$var entry \$k must be an integer"; + = "Erro: \$var inserida \$k precisa ser um inteiro"; $Lang{CfgEdit_Error__entry__must_be_real_valued_number} - = "Error: \$var entry \$k must be a real-valued number"; + = "Erro: \$var inserida \$k precisa ser um número com valor-real"; $Lang{CfgEdit_Error__must_be_executable_program} - = "Error: \$var must be a valid executable path"; + = "Erro: \$var precisa ser um caminho executável válido"; $Lang{CfgEdit_Error__must_be_valid_option} - = "Error: \$var must be a valid option"; + = "Erro: \$var precisa ser uma opção válida"; $Lang{CfgEdit_Error_Copy_host_does_not_exist} - = "Copy host \$copyHost doesn't exist; creating full host name \$fullHost. Delete this host if that is not what you wanted."; + = "Copia host \$copyHost não existe; criando nome de host completo \$fullHost. Exclua este hosts se náo for o que você deseja."; $Lang{CfgEdit_Log_Copy_host_config} - = "\$User copied config from host \$fromHost to \$host\n"; + = "\$User configuração copiada do host \$fromHost para \$host\n"; $Lang{CfgEdit_Log_Delete_param} - = "\$User deleted \$p from \$conf\n"; + = "\$User excluido \$p do \$conf\n"; $Lang{CfgEdit_Log_Add_param_value} - = "\$User added \$p to \$conf, set to \$value\n"; + = "\$User adicionado \$p para \$conf, marcado para \$value\n"; $Lang{CfgEdit_Log_Change_param_value} - = "\$User changed \$p in \$conf to \$valueNew from \$valueOld\n"; + = "\$User alterado \$p em \$conf para \$valueNew de \$valueOld\n"; $Lang{CfgEdit_Log_Host_Delete} - = "\$User deleted host \$host\n"; + = "\$User excluido host \$host\n"; $Lang{CfgEdit_Log_Host_Change} - = "\$User host \$host changed \$key from \$valueOld to \$valueNew\n"; + = "\$User host \$host alterado \$key de \$valueOld para \$valueNew\n"; $Lang{CfgEdit_Log_Host_Add} - = "\$User added host \$host: \$value\n"; + = "\$User adicionado host \$host: \$value\n"; #end of lang_pt_BR.pm + diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 2da4ca9..960c222 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -94,7 +94,7 @@ sub new my $bpc = bless { %$paths, - Version => '3.0.0alpha', + Version => '3.0.0beta0', }, $class; $bpc->{storage} = BackupPC::Storage->new($paths); diff --git a/lib/BackupPC/PoolWrite.pm b/lib/BackupPC/PoolWrite.pm index 54b2105..c17cbee 100644 --- a/lib/BackupPC/PoolWrite.pm +++ b/lib/BackupPC/PoolWrite.pm @@ -56,7 +56,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Storage.pm b/lib/BackupPC/Storage.pm index 0d066e5..7c6a0e1 100644 --- a/lib/BackupPC/Storage.pm +++ b/lib/BackupPC/Storage.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm index 4213106..4f63417 100644 --- a/lib/BackupPC/Storage/Text.pm +++ b/lib/BackupPC/Storage/Text.pm @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -247,11 +247,13 @@ sub ConfigPath return "$s->{ConfDir}/config.pl" if ( !defined($host) ); if ( $s->{useFHS} ) { - return "$s->{ConfDir}/host/$host.pl"; + return "$s->{ConfDir}/pc/$host.pl"; } else { + return "$s->{TopDir}/pc/$host/config.pl" + if ( -f "$s->{TopDir}/pc/$host/config.pl" ); return "$s->{ConfDir}/$host.pl" if ( $host ne "config" && -f "$s->{ConfDir}/$host.pl" ); - return "$s->{TopDir}/pc/$host/config.pl"; + return "$s->{ConfDir}/pc/$host.pl"; } } @@ -287,6 +289,23 @@ sub ConfigDataRead $conf->{$param} = { "*" => $conf->{$param} }; } + # + # Handle backward compatibility with defunct BlackoutHourBegin, + # BlackoutHourEnd, and BlackoutWeekDays parameters. + # + if ( defined($conf->{BlackoutHourBegin}) ) { + push(@{$conf->{BlackoutPeriods}}, + { + hourBegin => $conf->{BlackoutHourBegin}, + hourEnd => $conf->{BlackoutHourEnd}, + weekDays => $conf->{BlackoutWeekDays}, + } + ); + delete($conf->{BlackoutHourBegin}); + delete($conf->{BlackoutHourEnd}); + delete($conf->{BlackoutWeekDays}); + } + return (undef, $conf); } diff --git a/lib/BackupPC/View.pm b/lib/BackupPC/View.pm index e050544..d879de2 100644 --- a/lib/BackupPC/View.pm +++ b/lib/BackupPC/View.pm @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -252,7 +252,9 @@ sub shareList $file = $1 if ( $file =~ /(.*)/ ); next if ( $file eq "attrib" && $mangle || $file eq "." - || $file eq ".." ); + || $file eq ".." + || $file eq "backupInfo" + ); my $fileUM = $file; $fileUM = $m->{bpc}->fileNameUnmangle($fileUM) if ( $mangle ); push(@shareList, $fileUM); @@ -456,6 +458,17 @@ sub dirHistory $files->{$fileUM}[$i]{inode} = $s[1]; } + # + # Flag deleted files + # + if ( defined($attr) ) { + my $a = $attr->get; + foreach my $fileUM ( keys(%$a) ) { + next if ( $a->{$fileUM}{type} != BPC_FTYPE_DELETED ); + $files->{$fileUM}[$i]{type} = BPC_FTYPE_DELETED; + } + } + # # Merge old backups. Don't merge directories from old # backups because every backup has an accurate directory @@ -471,18 +484,19 @@ sub dirHistory $files->{$fileUM}[$i] = $files->{$fileUM}[$k]; } } + } - # - # Finally, remove deleted files - # - if ( defined($attr) ) { - my $a = $attr->get; - foreach my $fileUM ( keys(%$a) ) { - next if ( $a->{$fileUM}{type} != BPC_FTYPE_DELETED ); - $files->{$fileUM}[$i] = undef if ( defined($files->{$fileUM}) ); - } - } + # + # Remove deleted files + # + for ( $i = 0 ; $i < @{$m->{backups}} ; $i++ ) { + foreach my $fileUM ( keys(%$files) ) { + next if ( !defined($files->{$fileUM}[$i]) + || $files->{$fileUM}[$i]{type} != BPC_FTYPE_DELETED ); + $files->{$fileUM}[$i] = undef; + } } + #print STDERR "Returning:\n", Dumper($files); return $files; } diff --git a/lib/BackupPC/Xfer/Archive.pm b/lib/BackupPC/Xfer/Archive.pm index 964c620..9da8e43 100644 --- a/lib/BackupPC/Xfer/Archive.pm +++ b/lib/BackupPC/Xfer/Archive.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/BackupPCd.pm b/lib/BackupPC/Xfer/BackupPCd.pm index a458429..7763ad7 100644 --- a/lib/BackupPC/Xfer/BackupPCd.pm +++ b/lib/BackupPC/Xfer/BackupPCd.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index 80d47a6..20e8b67 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -55,10 +55,10 @@ BEGIN { # # Note: also update configure.pl when this version number is changed! # - if ( $File::RsyncP::VERSION < 0.52 ) { + if ( $File::RsyncP::VERSION < 0.62 ) { $RsyncLibOK = 0; $RsyncLibErr = "File::RsyncP module version" - . " ($File::RsyncP::VERSION) too old: need 0.52"; + . " ($File::RsyncP::VERSION) too old: need 0.62"; } else { $RsyncLibOK = 1; } @@ -215,9 +215,12 @@ sub start if ( $t->{type} eq "full" ) { if ( $t->{partialNum} ) { $logMsg = "full backup started for directory $t->{shareName};" - . " updating partial $t->{partialNum}"; + . " updating partial #$t->{partialNum}"; } else { $logMsg = "full backup started for directory $t->{shareName}"; + if ( $t->{incrBaseBkupNum} ne "" ) { + $logMsg .= " (baseline backup #$t->{incrBaseBkupNum})"; + } } } else { $incrDate = $bpc->timeStamp($t->{incrBaseTime}, 1); diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm index d20d671..8846340 100644 --- a/lib/BackupPC/Xfer/RsyncDigest.pm +++ b/lib/BackupPC/Xfer/RsyncDigest.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index 2829e79..ea72dce 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -12,7 +12,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -321,8 +321,8 @@ sub viewCacheDir sub attribGetWhere { - my($fio, $f) = @_; - my($dir, $fname, $share, $shareM); + my($fio, $f, $noCache) = @_; + my($dir, $fname, $share, $shareM, $partial, $attr); $fname = $f->{name}; $fname = "$fio->{xfer}{pathHdrSrc}/$fname" @@ -341,15 +341,27 @@ sub attribGetWhere $dir = ""; $fname = $fio->{share}; } - $fio->viewCacheDir($share, $dir); $shareM .= "/$dir" if ( $dir ne "" ); - if ( defined(my $attr = $fio->{viewCache}{$shareM}{$fname}) ) { - return ($attr, 0); - } elsif ( defined(my $attr = $fio->{partialCache}{$shareM}{$fname}) ) { - return ($attr, 1); + + if ( $noCache ) { + $share = $fio->{share} if ( !defined($share) ); + my $dirAttr = $fio->{view}->dirAttrib($fio->{viewNum}, $share, $dir); + $attr = $dirAttr->{$fname}; } else { - return; + $fio->viewCacheDir($share, $dir); + if ( defined($attr = $fio->{viewCache}{$shareM}{$fname}) ) { + $partial = 0; + } elsif ( defined($attr = $fio->{partialCache}{$shareM}{$fname}) ) { + $partial = 1; + } else { + return; + } + if ( $attr->{mode} & S_HLINK_TARGET ) { + $attr->{hlink_self} = 1; + $attr->{mode} &= ~S_HLINK_TARGET; + } } + return ($attr, $partial); } sub attribGet @@ -377,8 +389,12 @@ sub attribGet $fio->log("$attr->{fullPath}: redirecting to $target (will trim " . "$fio->{xfer}{pathHdrSrc})") if ( $fio->{logLevel} >= 4 ); $target =~ s/^\Q$fio->{xfer}{pathHdrSrc}//; + $target =~ s{^/+}{}; + # + # Note: overwrites name to point to real file + # $f->{name} = $target; - $attr = $fio->attribGet($f); + ($attr) = $fio->attribGetWhere($f, 1); $fio->log(" ... now got $attr->{fullPath}") if ( $fio->{logLevel} >= 4 ); } @@ -663,12 +679,13 @@ sub makeSpecial my($fh, $fileData); if ( $fio->{full} || !defined($attr) - || $attr->{type} != $type - || $attr->{mtime} != $f->{mtime} - || $attr->{size} != $f->{size} - || $attr->{uid} != $f->{uid} - || $attr->{gid} != $f->{gid} - || $attr->{mode} != $f->{mode} + || $attr->{type} != $type + || $attr->{mtime} != $f->{mtime} + || $attr->{size} != $f->{size} + || $attr->{uid} != $f->{uid} + || $attr->{gid} != $f->{gid} + || $attr->{mode} != $f->{mode} + || $attr->{hlink_self} != $f->{hlink_self} || !defined($fh = BackupPC::FileZIO->open($attr->{fullPath}, 0, $attr->{compress})) || $fh->read(\$fileData, length($str) + 1) != length($str) @@ -838,6 +855,21 @@ sub fileDeltaRxStart . " ($fio->{rxLocalAttr}{compress} vs $fio->{xfer}{compress})") if ( $fio->{logLevel} >= 4 ); } + # + # If the local file is a hardlink then no match + # + if ( defined($fio->{rxLocalAttr}) + && $fio->{rxLocalAttr}{type} == BPC_FTYPE_HARDLINK ) { + $fio->{rxMatchBlk} = undef; + $fio->log("$fio->{rxFile}{name}: no match on hardlinks") + if ( $fio->{logLevel} >= 4 ); + my $fCopy; + # need to copy since hardlink attribGet overwrites the name + %{$fCopy} = %$f; + $fio->{rxHLinkAttr} = $fio->attribGet($fCopy, 1); # hardlink attributes + } else { + delete($fio->{rxHLinkAttr}); + } delete($fio->{rxInFd}); delete($fio->{rxOutFd}); delete($fio->{rxDigest}); @@ -907,12 +939,15 @@ sub fileDeltaRxNext my $attr = $fio->{rxLocalAttr}; my $fh; if ( !defined($fio->{rxInFd}) && !defined($fio->{rxInData}) ) { + my $inPath = $attr->{fullPath}; + $inPath = $fio->{rxHLinkAttr}{fullPath} + if ( defined($fio->{rxHLinkAttr}) ); if ( $attr->{compress} ) { if ( !defined($fh = BackupPC::FileZIO->open( - $attr->{fullPath}, + $inPath, 0, $attr->{compress})) ) { - $fio->log("Can't open $attr->{fullPath}"); + $fio->log("Can't open $inPath"); $fio->{stats}{errorCnt}++; return -1; } @@ -963,12 +998,12 @@ sub fileDeltaRxNext } $fh->close; } else { - if ( open(F, "<", $attr->{fullPath}) ) { + if ( open(F, "<", $inPath) ) { binmode(F); $fio->{rxInFd} = *F; $fio->{rxInName} = $attr->{fullPath}; } else { - $fio->log("Unable to open $attr->{fullPath}"); + $fio->log("Unable to open $inPath"); $fio->{stats}{errorCnt}++; return -1; } @@ -981,7 +1016,7 @@ sub fileDeltaRxNext my $seekPosn = $fio->{rxMatchBlk} * $fio->{rxBlkSize}; if ( defined($fio->{rxInFd}) && !sysseek($fio->{rxInFd}, $seekPosn, 0) ) { - $fio->log("Unable to seek $attr->{rxInName} to $seekPosn"); + $fio->log("Unable to seek $fio->{rxInName} to $seekPosn"); $fio->{stats}{errorCnt}++; return -1; } @@ -1144,11 +1179,13 @@ sub fileDeltaRxDone my $f = $fio->{rxFile}; $fio->logFileAction("same", $f) if ( $fio->{logLevel} >= 1 ); if ( $fio->{full} - || $attr->{type} != $f->{type} - || $attr->{mtime} != $f->{mtime} - || $attr->{size} != $f->{size} - || $attr->{gid} != $f->{gid} - || $attr->{mode} != $f->{mode} ) { + || $attr->{type} != $f->{type} + || $attr->{mtime} != $f->{mtime} + || $attr->{size} != $f->{size} + || $attr->{uid} != $f->{uid} + || $attr->{gid} != $f->{gid} + || $attr->{mode} != $f->{mode} + || $attr->{hlink_self} != $f->{hlink_self} ) { # # In the full case, or if the attributes are different, # we need to make a link from the previous file and @@ -1217,6 +1254,10 @@ sub fileListEltSend my $type = $a->{type}; my $extraAttribs = {}; + if ( $a->{mode} & S_HLINK_TARGET ) { + $a->{hlink_self} = 1; + $a->{mode} &= ~S_HLINK_TARGET; + } $n =~ s/^\Q$fio->{xfer}{pathHdrSrc}//; $fio->log("Sending $name (remote=$n) type = $type") if ( $fio->{logLevel} >= 1 ); if ( $type == BPC_FTYPE_CHARDEV @@ -1262,7 +1303,7 @@ sub fileListEltSend && ($type == BPC_FTYPE_HARDLINK || $type == BPC_FTYPE_FILE) && ($type == BPC_FTYPE_HARDLINK || $fio->{protocol_version} < 27 - || ($a->{mode} & S_HLINK_TARGET) ) ) { + || $a->{hlink_self}) ) { # # Fill in fake inode information so that the remote rsync # can correctly create hardlinks. @@ -1287,7 +1328,7 @@ sub fileListEltSend $fio->log("$a->{fullPath}: can't open for hardlink"); $fio->{stats}{errorCnt}++; } - } elsif ( $a->{mode} & S_HLINK_TARGET ) { + } elsif ( $a->{hlink_self} ) { if ( defined($fio->{hlinkFile2Num}{$name}) ) { $inode = $fio->{hlinkFile2Num}{$name}; } else { diff --git a/lib/BackupPC/Xfer/Smb.pm b/lib/BackupPC/Xfer/Smb.pm index 3839271..c9242f4 100644 --- a/lib/BackupPC/Xfer/Smb.pm +++ b/lib/BackupPC/Xfer/Smb.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Xfer/Tar.pm b/lib/BackupPC/Xfer/Tar.pm index e9b2945..c78ff53 100644 --- a/lib/BackupPC/Xfer/Tar.pm +++ b/lib/BackupPC/Xfer/Tar.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/Zip/FileMember.pm b/lib/BackupPC/Zip/FileMember.pm index aec0eb3..7be7d6d 100644 --- a/lib/BackupPC/Zip/FileMember.pm +++ b/lib/BackupPC/Zip/FileMember.pm @@ -33,7 +33,7 @@ # #======================================================================== # -# Version 3.0.0alpha, released 23 Jan 2006. +# Version 3.0.0beta0, released 11 Jul 2006. # # See http://backuppc.sourceforge.net. # diff --git a/makeDist b/makeDist index fc16eef..6c081e5 100755 --- a/makeDist +++ b/makeDist @@ -43,11 +43,18 @@ use strict; use File::Path; use File::Copy; use Getopt::Std; +use lib "./lib"; +use BackupPC::Lib; +use BackupPC::Config::Meta qw(:all); + +my $bpc; +die("BackupPC::Lib->new failed\n") + if ( !($bpc = BackupPC::Lib->new(".", ".", "./conf", 1)) ); umask(0022); -my $Version = "3.0.0alpha"; -my $ReleaseDate = "23 Jan 2006"; +my $Version = "3.0.0beta0"; +my $ReleaseDate = "11 Jul 2006"; my $DistDir = "dist/BackupPC-$Version"; my @PerlSrc = qw( @@ -292,6 +299,8 @@ sub InstallFile print OUT "$1'__INSTALLDIR__'$2\n"; } elsif ( $file =~ /Lib.pm/ && /^(\s*my \$useFHS\s*=\s*)\d;/ ) { print OUT "${1}0;\n"; + } elsif ( $file =~ /Lib.pm/ && /(.*Version *=> .*)'[\w\d\.]+',/ ) { + print OUT "$1'$Version',\n"; } elsif ( $file =~ /configure.pl/ && /__CONFIGURE_BIN_LIST__/ ) { print OUT " ", join("\n ", grep(/^bin\//, @PerlSrc)), "\n"; } elsif ( $file =~ /configure.pl/ && /__CONFIGURE_LIB_LIST__/ ) { @@ -435,6 +444,25 @@ sub CheckMetaDataVsConfig print("$file missing $v from conf/config.pl\n"); $errors++; } + + # + # Do extra checks that the CgiUserConfigEdit hash in the Meta + # file matches the config file + # + foreach my $p ( keys(%{$ConfigMeta{CgiUserConfigEdit}{child}}) ) { + if ( !defined($bpc->{Conf}{CgiUserConfigEdit}{$p}) ) { + print("lib/BackupPC/Config/Meta.pm has $p in CgiUserConfigEdit," + . " but conf/config.pl CgiUserConfigEdit does not\n"); + $errors++; + } + } + foreach my $p ( keys(%{$bpc->{Conf}{CgiUserConfigEdit}}) ) { + if ( !defined($ConfigMeta{CgiUserConfigEdit}{child}{$p}) ) { + print("conf/config.pl CgiUserConfigEdit has $p, but" + . " lib/BackupPC/Config/Meta.pm does not\n"); + $errors++; + } + } return $errors; } @@ -481,7 +509,8 @@ sub CheckLangUsage foreach my $file ( ( qw(cgi-bin/BackupPC_Admin bin/BackupPC_sendEmail), - + , + , ) ) { open(F, $file) || die("can't open $file"); binmode(F); -- 2.20.1