* The CSS definition has been removed from the config.pl file and
authorcbarratt <cbarratt>
Mon, 29 Mar 2004 19:03:50 +0000 (19:03 +0000)
committercbarratt <cbarratt>
Mon, 29 Mar 2004 19:03:50 +0000 (19:03 +0000)
  is now a separate file, BackupPC_stnd.css.  A new config variable,
  $Conf{CgiCSSFile}, gives the name of the CSS file to use.
  Suggested by Ender Mathias.

* Fixed the filling of the host name select box for admins.
  The default $Conf{CgiNavBarAdminAllHosts} is now 1.
  Reported by Doug Lytle.

* Cleaned up warning message for restore using rsync when checksum
  caching is on, but when file didn't have cached checksums.

19 files changed:
ChangeLog
bin/BackupPC_dump
conf/BackupPC_stnd.css [new file with mode: 0644]
conf/config.pl
configure.pl
doc-src/BackupPC.pod
lib/BackupPC/CGI/Archive.pm
lib/BackupPC/CGI/Lib.pm
lib/BackupPC/CGI/Restore.pm
lib/BackupPC/CGI/RestoreInfo.pm
lib/BackupPC/CGI/Summary.pm
lib/BackupPC/Lang/de.pm
lib/BackupPC/Lang/en.pm
lib/BackupPC/Lang/es.pm
lib/BackupPC/Lang/fr.pm
lib/BackupPC/Lang/it.pm
lib/BackupPC/PoolWrite.pm
lib/BackupPC/Xfer/RsyncFileIO.pm
makeDist

index 2499045..bcb84d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 # Version __VERSION__, __RELEASEDATE__
 #------------------------------------------------------------------------
 
+* The CSS definition has been removed from the config.pl file and
+  is now a separate file, BackupPC_stnd.css.  A new config variable,
+  $Conf{CgiCSSFile}, gives the name of the CSS file to use.
+  Suggested by Ender Mathias.
+
+* Fixed the filling of the host name select box for admins.
+  The default $Conf{CgiNavBarAdminAllHosts} is now 1.
+  Reported by Doug Lytle.
+
+* Cleaned up warning message for restore using rsync when checksum
+  caching is on, but when file didn't have cached checksums.
+
+#------------------------------------------------------------------------
+# Version 2.1.0beta0, 20 Mar 2004
+#------------------------------------------------------------------------
+
 * A failed full dump is now saved as a partial (incomplete) dump,
   provided it includes some files.  This can be used for browsing,
   restoring etc, and will also form the basis of resuming full
index 2b1d300..2f3b7a3 100755 (executable)
@@ -280,14 +280,15 @@ my $partialNum;
 if ( $Conf{FullPeriod} == -1 && !$opts{f} && !$opts{i}
         || $Conf{FullPeriod} == -2 ) {
     print(STDERR "Exiting because backups are disabled with"
-               . "\$Conf{FullPeriod} = $Conf{FullPeriod}\n") if ( $opts{v} );
+               . " \$Conf{FullPeriod} = $Conf{FullPeriod}\n") if ( $opts{v} );
     #
     # Tell BackupPC to ignore old failed backups on hosts that
     # have backups disabled.
     #
     print("backups disabled\n")
-               if ( $StatusHost{reason} ne "Reason_backup_done"
-                    && time - $StatusHost{startTime} > 2 * 24 * 3600 );
+               if ( defined($StatusHost{errorTime})
+                    && $StatusHost{reason} ne "Reason_backup_done"
+                    && time - $StatusHost{errorTime} > 4 * 24 * 3600 );
     NothingToDo($needLink);
 }
 
diff --git a/conf/BackupPC_stnd.css b/conf/BackupPC_stnd.css
new file mode 100644 (file)
index 0000000..c499bb7
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * BackupPC standard CSS definitions
+ *
+ * Version 2.1.0beta0, released 20 Mar 2004.
+ *
+ * See http://backuppc.sourceforge.net.
+ *
+ * AUTHOR
+ *   Craig Barratt  <cbarratt@users.sourceforge.net>
+ *
+ * COPYRIGHT
+ *   Copyright (C) 2004  Craig Barratt
+ */
+
+body {
+    font-family:arial,sans-serif;
+    font-size:1em;
+    background-color:#ffffff;
+    margin:2px 5px 0px 2px;
+    height:100%
+}
+
+h1 {
+    font-family:arial,sans-serif;
+    font-size:1.5em;
+    color:#000000
+}
+
+h2 {
+    font-family:arial,sans-serif;
+    font-size:1em;
+    color:#000000
+}
+
+p {
+    font-family:arial,sans-serif;
+    font-size:.9em
+}
+
+a {
+    font-family:arial,sans-serif;
+    color:#3333ff
+}
+
+li {
+    font-size:.9em;
+}
+
+a:hover {
+    color:#cc0000;
+    text-decoration:none
+}
+
+a.NavCurrent {
+    font-weight:bold;
+}
+
+a.navbar {
+    padding-left:5px;
+    padding-right:5px;
+}
+
+.h1 {
+    font-family:arial,sans-serif;
+    font-size:1.5em;
+    color:#000000;
+    font-weight:bold;
+    background-color:#99cc33;
+    padding:3px;
+    padding-left:6px;
+    margin-bottom:5px;
+}
+
+.h2 {
+    font-family:arial,sans-serif;
+    font-size:1em;
+    color:#000000;
+    font-weight:bold;
+    background-color:#ddeeee;
+    padding:3px;
+    padding-left:6px;
+    margin-top:3px;
+    margin-bottom:1px;
+}
+
+.tableStnd {
+}
+
+.tableheader {
+    font-size:.8em;
+    font-weight:bold;
+    background-color:#cccccc;
+}
+
+.border {
+    font-size:.9em;
+}
+
+.fviewheader {
+    font-weight:bold;
+    font-size:.8em;
+    color:#ffffff;
+    background-color:#999999;
+}
+
+.fviewborder {
+    border-bottom:1px solid #000000;
+    border-left:1px dotted #666666;
+    background-color:#dddddd;
+    font-size:.9em;
+}
+
+.fviewon {
+    background-color:#cccccc;
+}
+
+.fviewoff {
+    background-color:#ffffff;
+}
+
+.fview {
+    font-size:.8em;
+    font-family:arial,sans-serif;
+    text-decoration:none;
+    line-height:15px;
+}
+
+.fviewbold {
+    font-size:.9em;
+    font-family:arial,sans-serif;
+    text-decoration:none;
+    line-height:15px;
+    font-weight:bold;
+}
+
+.histView {
+    border-bottom:1px solid #000000;
+    border-left:2px solid #ffffff;
+    background-color:#dddddd;
+    font-size:.9em;
+}
+
+.histViewMis {
+    border-bottom:1px solid #000000;
+    background-color:#ffdddd;
+}
+
+div.NavMenu {
+    width:18%;
+    margin:0px;
+    background-color:#ddeeee;
+}
+
+div.NavMenu a {
+    font-size:.8em;
+    display:block;
+    margin-left:8px;
+    padding:2px;
+}
+
+div.NavTitle {
+    padding-left:10px;
+    background-color:#99cc33;
+    font-family:arial,sans-serif;
+    color:#000000;
+    font-weight:bold;
+    margin-bottom:2px;
+}
+
+#Content {
+    float:right;
+    width:80%;
+    left:20%;
+    top:10px;
+    position:absolute;
+}
index 1b8054c..58991e1 100644 (file)
@@ -108,6 +108,13 @@ $Conf{UmaskMode} = 027;
 #
 # The default value is every hour except midnight.
 #
+# The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly
+# is run.  No other backups can run while BackupPC_nightly is
+# running.  You might want to re-arrange the entries in
+# $Conf{WakeupSchedule} (they don't have to be ascending) so that
+# the first entry is when you want BackupPC_nightly to run
+# (eg: when you don't expect a lot of regular backups to run).
+#
 $Conf{WakeupSchedule} = [1..23];
 
 #
@@ -337,10 +344,6 @@ $Conf{TarShareName} = '/';
 # being backed up (eg: a retired machine), but you wish to keep the
 # last backups available for browsing or restoring to other machines.
 #
-# Also, you might create a virtual client (by setting $Conf{ClientNameAlias})
-# for restoring to a DVD or permanent media and you would set
-# $Conf{FullPeriod} to -2 so that it is never backed up.
-#
 $Conf{FullPeriod} = 6.97;
 
 #
@@ -960,6 +963,14 @@ $Conf{RsyncArgs} = [
             '--times',
             '--block-size=2048',
             '--recursive',
+
+           #
+           # If you are using a patched client rsync that supports the
+           # --fixed-csumseed option (see http://backuppc.sourceforge.net),
+           # then uncomment this to enabled rsync checksum cachcing
+           #
+           #'--fixed-csumseed',
+
            #
            # Add additional arguments here
            #
@@ -977,17 +988,25 @@ $Conf{RsyncRestoreArgs} = [
            #
            # Do not edit these!
            #
-           "--numeric-ids",
-           "--perms",
-           "--owner",
-           "--group",
-           "--devices",
-           "--links",
-           "--times",
-           "--block-size=2048",
-           "--relative",
-           "--ignore-times",
-           "--recursive",
+           '--numeric-ids',
+           '--perms',
+           '--owner',
+           '--group',
+           '--devices',
+           '--links',
+           '--times',
+           '--block-size=2048',
+           '--relative',
+           '--ignore-times',
+           '--recursive',
+
+           #
+           # If you are using a patched client rsync that supports the
+           # --fixed-csumseed option (see http://backuppc.sourceforge.net),
+           # then uncomment this to enabled rsync checksum cachcing
+           #
+           #'--fixed-csumseed',
+
            #
            # Add additional arguments here
            #
@@ -1535,11 +1554,11 @@ $Conf{CgiDateFormatMMDD} = 1;
 
 #
 # If set, the complete list of hosts appears in the left navigation
-# bar for administrators.  Otherwise, just the hosts for which the
-# user is listed in the host file (as either the user or in moreUsers)
+# bar pull-down for administrators.  Otherwise, just the hosts for which
+# the user is listed in the host file (as either the user or in moreUsers)
 # are displayed.
 #
-$Conf{CgiNavBarAdminAllHosts} = 0;
+$Conf{CgiNavBarAdminAllHosts} = 1;
 
 #
 # Hilight colors based on status that are used in the PC summary page.
@@ -1589,171 +1608,8 @@ $Conf{CgiExt2ContentType} = { };
 $Conf{CgiImageDirURL} = '';
 
 #
-# CSS stylesheet for the CGI interface.
-#
-$Conf{CSSstylesheet} = <<'EOF';
-<style type="text/css">
-body {
-    font-family:arial,sans-serif;
-    font-size:1em;
-    background-color:#ffffff;
-    margin:2px 5px 0px 2px;
-    height:100%
-}
-
-h1 {
-    font-family:arial,sans-serif;
-    font-size:1.5em;
-    color:#000000
-}
-
-h2 {
-    font-family:arial,sans-serif;
-    font-size:1em;
-    color:#000000
-}
-
-p {
-    font-family:arial,sans-serif;
-    font-size:.9em
-}
-
-a {
-    font-family:arial,sans-serif;
-    color:#3333ff
-}
-
-li {
-    font-size:.9em;
-}
-
-a:hover {
-    color:#cc0000;
-    text-decoration:none
-}
-
-a.NavCurrent {
-    font-weight:bold;
-}
-
-a.navbar {
-    padding-left:5px;
-    padding-right:5px;
-}
-
-.h1 {
-    font-family:arial,sans-serif;
-    font-size:1.5em;
-    color:#000000;
-    font-weight:bold;
-    background-color:#99cc33;
-    padding:3px;
-    padding-left:6px;
-    margin-bottom:5px;
-}
-
-.h2 {
-    font-family:arial,sans-serif;
-    font-size:1em;
-    color:#000000;
-    font-weight:bold;
-    background-color:#ddeeee;
-    padding:3px;
-    padding-left:6px;
-    margin-top:3px;
-    margin-bottom:1px;
-}
-
-.tableStnd {
-}
-
-.tableheader {
-    font-size:.8em;
-    font-weight:bold;
-    background-color:#cccccc;
-}
-
-.border {
-    font-size:.9em;
-}
-
-.fviewheader {
-    font-weight:bold;
-    font-size:.8em;
-    color:#ffffff;
-    background-color:#999999;
-}
-
-.fviewborder {
-    border-bottom:1px solid #000000;
-    border-left:1px dotted #666666;
-    background-color:#dddddd;
-    font-size:.9em;
-}
-
-.fviewon {
-    background-color:#cccccc;
-}
-
-.fviewoff {
-    background-color:#ffffff;
-}
-
-.fview {
-    font-size:.8em;
-    font-family:arial,sans-serif;
-    text-decoration:none;
-    line-height:15px;
-}
-
-.fviewbold {
-    font-size:.9em;
-    font-family:arial,sans-serif;
-    text-decoration:none;
-    line-height:15px;
-    font-weight:bold;
-}
-
-.histView {
-    border-bottom:1px solid #000000;
-    border-left:2px solid #ffffff;
-    background-color:#dddddd;
-    font-size:.9em;
-}
-
-.histViewMis {
-    border-bottom:1px solid #000000;
-    background-color:#ffdddd;
-}
-
-div.NavMenu {
-    width:18%;
-    margin:0px;
-    background-color:#ddeeee;
-}
-
-div.NavMenu a {
-    font-size:.8em;
-    display:block;
-    margin-left:8px;
-    padding:2px;
-}
-
-div.NavTitle {
-    padding-left:10px;
-    background-color:#99cc33;
-    font-family:arial,sans-serif;
-    color:#000000;
-    font-weight:bold;
-    margin-bottom:2px;
-}
-
-#Content {
-    float:right;
-    width:80%;
-    left:20%;
-    top:10px;
-    position:absolute;
-}
-</style>
-EOF
+# CSS stylesheet for the CGI interface.  It is stored in the
+# $Conf{CgiImageDir} directory and accessed via the
+# $Conf{CgiImageDirURL} URL.
+#
+$Conf{CgiCSSFile} = 'BackupPC_stnd.css';
index 76ecb2e..1f787df 100755 (executable)
@@ -470,6 +470,16 @@ if ( $Conf{CgiImageDir} ne "" ) {
        (my $destImg = $img) =~ s{^images/}{};
        InstallFile($img, "$Conf{CgiImageDir}/$destImg", 0444, 1);
     }
+
+    #
+    # Install new CSS file, making a backup copy if necessary
+    #
+    my $cssBackup = "$Conf{CgiImageDir}/BackupPC_stnd.css.pre-__VERSION__";
+    if ( -f "$Conf{CgiImageDir}/BackupPC_stnd.css" && !-f $cssBackup ) {
+       rename("$Conf{CgiImageDir}/BackupPC_stnd.css", $cssBackup);
+    }
+    InstallFile("conf/BackupPC_stnd.css",
+               "$Conf{CgiImageDir}/BackupPC_stnd.css", 0444, 0);
 }
 
 printf("Making init.d scripts\n");
@@ -533,6 +543,11 @@ if ( defined($Conf{SmbClientArgs}) ) {
     delete($Conf{SmbClientArgs});
 }
 
+#
+# CSS is now stored in a file rather than a big config variable.
+#
+delete($Conf{CSSstylesheet});
+
 #
 # The blackout timing settings are now stored in a list of hashes, rather
 # than three scalar parameters.
@@ -553,7 +568,15 @@ if ( defined($Conf{BlackoutHourBegin}) ) {
 #
 # $Conf{RsyncLogLevel} has been replaced by $Conf{XferLogLevel}
 #
-$Conf{XferLogLevel} = $Conf{RsyncLogLevel};
+if ( defined($Conf{RsyncLogLevel}) ) {
+    $Conf{XferLogLevel} = $Conf{RsyncLogLevel};
+    delete($Conf{RsyncLogLevel});
+}
+
+#
+# In 2.1.0 the default for $Conf{CgiNavBarAdminAllHosts} is now 1
+#
+$Conf{CgiNavBarAdminAllHosts} = 1;
 
 #
 # IncrFill should now be off
index a8ddc27..96e6c1f 100644 (file)
@@ -96,10 +96,13 @@ BackupPC is Open Source software hosted by SourceForge.
 
 =item Full Backup
 
-A full backup is a complete backup of a share. BackupPC can be configured to
-do a full backup at a regular interval (often weekly). BackupPC can also
-be configured to keep a certain number of full backups, and to keep
-a smaller number of very old full backups.
+A full backup is a complete backup of a share. BackupPC can be
+configured to do a full backup at a regular interval (typically
+weekly).  BackupPC can be configured to keep a certain number
+of full backups.  Exponential expiry is also supported, allowing
+full backups with various vintages to be kept (for example, a
+settable number of most recent weekly fulls, plus a settable
+number of older fulls that are 2, 4, 8, or 16 weeks apart).
 
 =item Incremental Backup
 
@@ -121,6 +124,23 @@ 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.
 
+=item Partial Backup
+
+When a full backup fails or is canceled, and some files have already
+been backed up, BackupPC keeps a partial backup containing just the
+files that were backed up successfully.  The partial backup is removed
+when the next successful backup completes, or if another full backup
+fails resulting in a newer partial backup.  A failed full backup
+that has not backed up any files, or any failed incremental backup,
+is removed; no partial backup is saved in these cases.
+
+The partial backup may be browsed or used to restore files just like
+a successful full or incremental backup.
+
+With the rsync transfer method the partial backup is used to resume
+the next full backup, avoiding the need to retransfer the file data
+already in the partial backup.
+
 =item Identical Files
 
 BackupPC pools identical files using hardlinks.  By "identical
index 864a2ea..758cac3 100644 (file)
@@ -43,7 +43,11 @@ use Data::Dumper;
 sub action
 {
     my $archHost = $In{host};
+    my $Privileged = CheckPermission();
 
+    if ( !$Privileged ) {
+       ErrorExit($Lang->{Only_privileged_users_can_archive} );
+    }
     if ( $In{type} == 0 ) {
         my($fullTot, $fullSizeTot, $incrTot, $incrSizeTot, $str,
            $strNone, $strGood, $hostCntGood, $hostCntNone, $checkBoxCnt,
@@ -51,11 +55,7 @@ sub action
 
         $hostCntGood = $hostCntNone = $checkBoxCnt = $fullSizeTot = 0;
         GetStatusInfo("hosts");
-        my $Privileged = CheckPermission();
 
-        if ( !$Privileged ) {
-            ErrorExit($Lang->{Only_privileged_users_can_archive} );
-        }
         foreach my $host ( sort(keys(%Status)) ) {
             my($fullDur, $incrCnt, $fullSize, $fullRate);
             my @Backups = $bpc->BackupInfoRead($host);
@@ -98,7 +98,6 @@ EOF
     } else {
         my(@HostList, @BackupList, $HostListStr, $hiddenStr, $pathHdr,
            $badFileCnt, $reply, $str);
-        my $Privileged = CheckPermission();
         my $args = {
             SplitPath    => $bpc->{Conf}{SplitPath},
             ParPath      => $bpc->{Conf}{ParPath},
@@ -112,9 +111,6 @@ EOF
             topDir       => $bpc->{TopDir},
         };
 
-        if ( !$Privileged ) {
-            ErrorExit($Lang->{Only_privileged_users_can_archive} );
-        }
         ServerConnect();
 
         for ( my $i = 0 ; $i < $In{fcbMax} ; $i++ ) {
index aee4743..40950f8 100644 (file)
@@ -320,9 +320,10 @@ sub CheckPermission
         $Privileged ||= $Conf{CgiAdminUsers} eq "*";
     }
     $PrivAdmin = $Privileged;
+    return $Privileged if ( !defined($host) );
+
     $Privileged ||= $User eq $Hosts->{$host}{user};
     $Privileged ||= defined($Hosts->{$host}{moreUsers}{$User});
-
     return $Privileged;
 }
 
@@ -334,7 +335,7 @@ sub CheckPermission
 #
 sub GetUserHosts
 {
-    my($host, $getAll) = @_;
+    my($getAll) = @_;
     my @hosts;
 
     if ( $getAll && CheckPermission() ) {
@@ -414,7 +415,7 @@ sub Header
 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
 <title>$title</title>
-$Conf{CSSstylesheet}
+<link rel=stylesheet type="text/css" href="$Conf{CgiImageDirURL}/$Conf{CgiCSSFile}" title="CSSFile">
 $Conf{CgiHeaders}
 </head><body onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight">
 <img src="$Conf{CgiImageDirURL}/logo.gif" hspace="5" vspace="7"><br>
@@ -464,7 +465,7 @@ EOF
 <div class="NavMenu" id="NavMenu" style="height:100%">
 EOF
     my $hostSelectbox = "<option value=\"#\">$Lang->{Select_a_host}</option>";
-    my @hosts = GetUserHosts($In{host}, $Conf{CgiNavBarAdminAllHosts});
+    my @hosts = GetUserHosts($Conf{CgiNavBarAdminAllHosts});
     if ( defined($Hosts) && %$Hosts > 0 && @hosts ) {
        NavSectionTitle($Lang->{Hosts});
         foreach my $host ( @hosts ) {
index 2c1a285..f00ce59 100644 (file)
@@ -104,7 +104,7 @@ EOF
        #
        my $hostDestSel;
         my @hosts;
-       foreach my $h ( GetUserHosts() ) {
+       foreach my $h ( GetUserHosts(1) ) {
            my $sel = " selected" if ( $h eq $In{host} );
            $hostDestSel .= "<option value=\"$h\"$sel>${EscHTML($h)}</option>";
             push(@hosts, $h);
@@ -265,7 +265,8 @@ EOF
             my $targetFile = $f;
            (my $strippedShare = $share) =~ s/^\///;
            (my $strippedShareDest = $In{shareDest}) =~ s/^\///;
-            substr($targetFile, 0, length($pathHdr)) = $In{pathHdr};
+            substr($targetFile, 0, length($pathHdr)) = "/$In{pathHdr}/";
+           $targetFile =~ s{//+}{/}g;
             $fileListStr .= <<EOF;
 <tr><td>$host:/$strippedShare$f</td><td>$In{hostDest}:/$strippedShareDest$targetFile</td></tr>
 EOF
@@ -293,6 +294,9 @@ EOF
             $reqFileName = "restoreReq.$$.$i";
             last if ( !-f "$TopDir/pc/$hostDest/$reqFileName" );
         }
+       my $inPathHdr = $In{pathHdr};
+       $inPathHdr = "/$inPathHdr" if ( $inPathHdr !~ m{^/} );
+       $inPathHdr = "$inPathHdr/" if ( $inPathHdr !~ m{/$} );
         my %restoreReq = (
            # source of restore is hostSrc, #num, path shareSrc/pathHdrSrc
             num         => $In{num},
@@ -303,7 +307,7 @@ EOF
            # destination of restore is hostDest:shareDest/pathHdrDest
             hostDest    => $hostDest,
             shareDest   => $In{shareDest},
-            pathHdrDest => $In{pathHdr},
+            pathHdrDest => $inPathHdr,
 
            # list of files to restore
             fileList    => \@fileList,
index 01b852a..8b7fbc9 100644 (file)
@@ -79,11 +79,12 @@ sub action
        (my $strippedShareDest = $RestoreReq{shareDest}) =~ s/^\///;
        substr($targetFile, 0, length($RestoreReq{pathHdrSrc}))
                                        = $RestoreReq{pathHdrDest};
+       $targetFile =~ s{//+}{/}g;
        $fileListStr .= <<EOF;
 <tr><td>$RestoreReq{hostSrc}:/$strippedShareSrc$f</td><td>$RestoreReq{hostDest}:/$strippedShareDest$targetFile</td></tr>
 EOF
     }
-    my $content = eval("qq{$Lang->{Restore___num_details_for__host2 }}");
+    my $content = eval("qq{$Lang->{Restore___num_details_for__host2}}");
     Header(eval("qq{$Lang->{Restore___num_details_for__host}}"),$content);
     Trailer();
 }
index 7ad92c5..fd2444c 100644 (file)
@@ -48,20 +48,17 @@ sub action
     GetStatusInfo("hosts");
     my $Privileged = CheckPermission();
 
-    foreach my $host ( GetUserHosts(undef, 1) ) {
+    foreach my $host ( GetUserHosts(1) ) {
         my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite);
        my($shortErr);
         my @Backups = $bpc->BackupInfoRead($host);
         my $fullCnt = $incrCnt = 0;
         my $fullAge = $incrAge = -1;
 
-        if ( defined(my $error = $bpc->ConfigRead($host)) ) {
-            print("dump failed: Can't read PC's config file: $error\n");
-            exit(1);
-        }
+        $bpc->ConfigRead($host);
         %Conf = $bpc->Conf();
 
-        if ($Conf{XferMethod} eq "archive" ) {
+        if ( $Conf{XferMethod} eq "archive" ) {
             next;
         }
 
index 3b874ff..2391c46 100644 (file)
@@ -857,10 +857,10 @@ EOF
 # ------------------------------
 $Lang{Restore___num_details_for__host} = "BackupServer: Restore #\$num Details für Computer \$host";
 
-$Lang{Restore___num_details_for__host2 } = <<EOF;
+$Lang{Restore___num_details_for__host2} = <<EOF;
 \${h1("Restore #\$num Details für Computer \$host")}
 <p>
-<table class="tableStnd" border cellspacing="1" cellpadding="3" width="50%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="90%">
 <tr><td class="tableheader"> Nummer </td><td class="border"> \$Restores[\$i]{num} </td></tr>
 <tr><td class="tableheader"> beauftragt von </td><td class="border"> \$RestoreReq{user} </td></tr>
 <tr><td class="tableheader"> Auftrag Zeitpunkt </td><td class="border"> \$reqTime </td></tr>
@@ -1009,7 +1009,7 @@ $Lang{Documentation} = "Dokumentation";
 #$Lang{Host_or_User_name} = "<small>Computer oder User Name:</small>";
 $Lang{Go} = "gehe zu";
 $Lang{Hosts} = "Computer";
-$Lang{Select_a_host} = "ENGLISH Select a host...";
+$Lang{Select_a_host} = "Computer auswählen...";
 
 $Lang{There_have_been_no_archives} = "<h2> Es existieren keine Archive </h2>\n";
 $Lang{This_PC_has_never_been_backed_up} = "<h2> Dieser Computer wurde nie gesichert!! </h2>\n";
index d209ba8..da86c75 100644 (file)
@@ -860,10 +860,10 @@ EOF
 # ------------------------------
 $Lang{Restore___num_details_for__host} = "BackupPC: Restore #\$num details for \$host";
 
-$Lang{Restore___num_details_for__host2 } = <<EOF;
+$Lang{Restore___num_details_for__host2} = <<EOF;
 \${h1("Restore #\$num Details for \$host")}
 <p>
-<table class="tableStnd" border cellspacing="1" cellpadding="3" width="50%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="90%">
 <tr><td class="tableheader"> Number </td><td class="border"> \$Restores[\$i]{num} </td></tr>
 <tr><td class="tableheader"> Requested by </td><td class="border"> \$RestoreReq{user} </td></tr>
 <tr><td class="tableheader"> Request time </td><td class="border"> \$reqTime </td></tr>
index 275763c..a595948 100644 (file)
@@ -862,10 +862,10 @@ EOF
 # ------------------------------
 $Lang{Restore___num_details_for__host} = "BackupPC: Detalles de la restauración Nº\$num de \$host";
 
-$Lang{Restore___num_details_for__host2 } = <<EOF;
+$Lang{Restore___num_details_for__host2} = <<EOF;
 \${h1("Detalles de la restauración Nº\$num de \$host")}
 <p>
-<table class="tableStnd" border cellspacing="1" cellpadding="3" width="50%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="90%">
 <tr><td class="tableheader"> Número </td><td class="border"> \$Restores[\$i]{num} </td></tr>
 <tr><td class="tableheader"> Solicitado por </td><td class="border"> \$RestoreReq{user} </td></tr>
 <tr><td class="tableheader"> Hora Petición </td><td class="border"> \$reqTime </td></tr>
index 593ed94..032f6d3 100644 (file)
@@ -858,10 +858,10 @@ EOF
 # ------------------------------
 $Lang{Restore___num_details_for__host} = "BackupPC: Détails de la restauration n° \$num pour \$host"; 
 
-$Lang{Restore___num_details_for__host2 } = <<EOF;
+$Lang{Restore___num_details_for__host2} = <<EOF;
 \${h1("Détails de la restauration n° \$num pour \$host")} 
 <p>
-<table class="tableStnd" border cellspacing="1" cellpadding="3" width="50%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="90%">
 <tr><td class="tableheader"> Numéro </td><td class="border"> \$Restores[\$i]{num} </td></tr>
 <tr><td class="tableheader"> Demandée par </td><td class="border"> \$RestoreReq{user} </td></tr>
 <tr><td class="tableheader"> Demandée à </td><td class="border"> \$reqTime </td></tr>
index 0960211..65bcd36 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/perl
 #
-# $Id: it.pm,v 1.4 2004/03/21 01:46:46 cbarratt Exp $
+# $Id: it.pm,v 1.5 2004/03/29 19:05:24 cbarratt Exp $
 #
 # Italian i18n file
 #
@@ -869,10 +869,10 @@ EOF
 # ------------------------------
 $Lang{Restore___num_details_for__host} = "BackupPC: dettagli ripristino numero \$num per \$host";
 
-$Lang{Restore___num_details_for__host2 } = <<EOF;
+$Lang{Restore___num_details_for__host2} = <<EOF;
 \${h1("Dettagli ripristino numero \$num per \$host")}
 <p>
-<table class="tableStnd" border cellspacing="1" cellpadding="3" width="50%">
+<table class="tableStnd" border cellspacing="1" cellpadding="3" width="90%">
 <tr><td class="tableheader"> Numero </td><td class="border"> \$Restores[\$i]{num} </td></tr>
 <tr><td class="tableheader"> Richiesto da </td><td class="border"> \$RestoreReq{user} </td></tr>
 <tr><td class="tableheader"> Data richiesta </td><td class="border"> \$reqTime </td></tr>
index f7624ca..a992e7a 100644 (file)
@@ -98,8 +98,8 @@ sub new
     return $self;
 }
 
-my $BufSize  = 1048576;     # 1MB or 2^20
-my $MaxFiles = 20;
+my $BufSize  = 1048576;  # 1MB or 2^20
+my $MaxFiles = 20;       # max number of compare files open at one time
 
 sub write
 {
@@ -119,6 +119,8 @@ sub write
     #
     if ( !defined($dataRef) && !defined($a->{digest})
                && $a->{fileSize} != length($a->{data}) ) {
+       #my $newSize = length($a->{data});
+       #print("Fixing file size from $a->{fileSize} to $newSize\n");
        $a->{fileSize} = length($a->{data});
     }
 
@@ -310,6 +312,7 @@ sub write
                push(@{$a->{errors}}, "Can't rename $a->{fileName} -> $fileName"
                                    . " or open during size fixup\n");
            }
+           #print("Using temporary name $fileName\n");
        } elsif ( defined($a->{files}) && defined($a->{files}[0]) ) {
            #
            # We haven't written anything yet, so just use the
@@ -317,6 +320,7 @@ sub write
            #
            $fh = $a->{files}[0]->{fh};
            $fh->rewind;
+           #print("Using compare file $a->{files}[0]->{name}\n");
        }
        if ( defined($fh) ) {
            my $poolWrite = BackupPC::PoolWrite->new($a->{bpc}, $a->{fileName},
index f987ced..2c25f62 100644 (file)
@@ -106,6 +106,7 @@ sub csumStart
 {
     my($fio, $f, $needMD4, $defBlkSize) = @_;
 
+    $defBlkSize ||= $fio->{blockSize};
     my $attr = $fio->attribGet($f);
     $fio->{file} = $f;
     $fio->csumEnd if ( defined($fio->{csum}) );
index e58c216..3e8ff3a 100755 (executable)
--- a/makeDist
+++ b/makeDist
@@ -42,8 +42,8 @@ use Getopt::Std;
 
 umask(0022);
 
-my $Version     = "2.1.0beta0";
-my $ReleaseDate = "20 Mar 2004";
+my $Version     = "2.1.0beta0_CVS";
+my $ReleaseDate = "29 Mar 2004";
 my $DistDir     = "dist/BackupPC-$Version";
 
 my @PerlSrc = qw(
@@ -188,6 +188,7 @@ foreach my $file ( (@PerlSrc,
            qw(
                conf/config.pl
                conf/hosts
+               conf/BackupPC_stnd.css
                init.d/README
                init.d/src/debian-backuppc
                init.d/src/gentoo-backuppc
@@ -227,7 +228,7 @@ sub InstallFile
        binmode(FILE);
        binmode(OUT);
        while ( <FILE> ) {
-           s/^# *Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/# Version __VERSION__, released __RELEASEDATE__./;
+           s/^([#*\s]+)Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/$1Version __VERSION__, released __RELEASEDATE__./;
            s/__VERSION__/$Version/g;
            s/__RELEASEDATE__/$ReleaseDate/g;
            if ( $file =~ /BackupPC\.html$/ ) {