[Patch] 3.1.0 partial and yearly backups

Matthias Meyer <[email protected]>
Newsgroups gmane.comp.sysutils.backup.backuppc.devel
Message-ID <[email protected]>
I've developed two enhancements to BackupPC 3.1.0 and use it since more than 
a year in my production environment.

$Conf{useEveryPartial} and $Conf{PartialAgeMax} will allow to store each 
interrupted full backup as well as each interrupted incremental backup as a 
partial backup.
This partial backups will be used by rsync like incremental backups.
I see in my environment a dramatical performance improvement at least for 
the initial backup of a new client.

$Conf{FullCntYearly} will allow to make the first backup of a year as an 
full backup and save this full backups an amount of years.

See BackupPC.html within the b4u-partial+yearly.patch for a more detailed 
description.

The involved files are:
 /usr/share/backuppc/lib/BackupPC/View.pm
 /usr/share/backuppc/lib/BackupPC/CGI/EditConfig.pm
 /usr/share/backuppc/lib/BackupPC/Config/Meta.pm
 /usr/share/backuppc/lib/BackupPC/Xfer/Rsync.pm
 /usr/share/backuppc/lib/BackupPC/Xfer/RsyncFileIO.pm

 /usr/share/backuppc/bin/BackupPC_dump
 /usr/share/backuppc/bin/BackupPC_link

 /usr/share/doc/backuppc/BackupPC.html

I've extracted the patch with "diff -ruN <new-file> <original-file>" but 
I've never applied this patch => Be carefull.

br
Matthias Meyer

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d

_______________________________________________
BackupPC-devel mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
b4u-partial+yearly.patch (text/x-patch, 20.1 KB)
--- usr/share/doc/backuppc/BackupPC.html	2010-01-25 22:32:04.000000000 +0100
+++ usr/share/doc/backuppc/_original/BackupPC.html	2009-06-03 12:05:56.000000000 +0200
@@ -254,8 +254,6 @@
 <p>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.</p>
-<p>See <a href="#item__conf_useeverypartial_">$Conf{useEveryPartial}</A>
-to adjust this behaviour</p>
 </dd>
 <dt><strong><a name="item_identical_files">Identical Files</a></strong></dt>
 
@@ -3055,20 +3053,14 @@
 
 <dt><strong><a name="item__conf_fullagemax_">$Conf{FullAgeMax} = 90;</a></strong></dt>
 
-<dt><strong><a name="item__conf_fullcntyearly_">$Conf{FullCntYearly} = 0;</a></strong></dt>
-
 <dd>
 <p>Very old full backups are removed after <a href="#item__conf_fullagemax_">$Conf{FullAgeMax}</A> days.  However,
 we keep at least <a href="#item__conf_fullkeepcntmin_">$Conf{FullKeepCntMin}</A> full backups no matter how old
 they are.</p>
-<p>The first backup of a year will be forced to be a full backup and we keep every first full backup of the last <a href="#item__conf_fullcntyearly_">$Conf{FullCntYearly}</A> years, if it is >0.</p>
-<p>Note that <a href="#item__conf_fullagemax_">$Conf{FullAgeMax}</A> will be increased to</p>
-<pre>
-	- <a href="#item__conf_fullkeepcnt_">$Conf{FullKeepCnt}</A> times <a href="#item__conf_fullperiod_">$Conf{FullPeriod}</A>
-	- <a href="#item__conf_fullcntyearly_">$Conf{FullCntYearly}</A> times 366 </pre>
-<p>if one of them specifies enough full backups to exceed <a href="#item__conf_fullagemax_">$Conf{FullAgeMax}</A>.</p>
+<p>Note that <a href="#item__conf_fullagemax_">$Conf{FullAgeMax}</A> will be increased to <a href="#item__conf_fullkeepcnt_">$Conf{FullKeepCnt}</A>
+times <a href="#item__conf_fullperiod_">$Conf{FullPeriod}</A> if <a href="#item__conf_fullkeepcnt_">$Conf{FullKeepCnt}</A> specifies enough
+full backups to exceed <a href="#item__conf_fullagemax_">$Conf{FullAgeMax}</A>.</p>
 </dd>
-
 <dt><strong><a name="item__conf_incrkeepcnt_">$Conf{IncrKeepCnt} = 6;</a></strong></dt>
 
 <dd>
@@ -3174,25 +3166,6 @@
 <p>In versions prior to 3.0 Backups were disabled by setting
 <a href="#item__conf_fullperiod_">$Conf{FullPeriod}</A> to -1 or -2.</p>
 </dd>
-<dt><strong><a name="item__conf_useeverypartial_">$Conf{useEveryPartial} = 1;</a></strong></dt>
-
-<dd>
-<p>Wether each interrupted backup or only interrupted full backups
-with more files as a previous interrupted backup should be stored
-as partial backup.</p>
-<pre>
-  0    A interrupted backup will only be stored as a partial
-       if it is a full backup and contains more files than a
-       previous partial backup.
-       The partial backup will be removed if a full backup ends
-       successfully.</pre>
-<pre>
-  1    Every interrupted backup, full backups as well as incrementals,
-       will be stored as partial backups.
-       All partial backups will be removed if the backup ends
-       succesfully. This successfull backup will contain the recent
-       version of any file which are backed up during any of the partials.</pre>
-</dd>
 <dt><strong><a name="item__conf_partialagemax_">$Conf{PartialAgeMax} = 3;</a></strong></dt>
 
 <dd>

--- usr/share/backuppc/lib/BackupPC/View.pm	2010-02-14 00:22:22.000000000 +0100
+++ usr/share/backuppc/lib/BackupPC/_original/View.pm	2009-06-03 12:05:55.000000000 +0200
@@ -105,7 +105,7 @@
 	#
 	next if ( $m->{backups}[$i]{level} >= $level );
 
-	$level = $m->{backups}[$i]{level} if ( $m->{backups}[$i-1]{type} ne "partial" );
+	$level = $m->{backups}[$i]{level};
 	$backupNum = $m->{backups}[$i]{num};
 	push(@{$m->{mergeNums}}, $backupNum);
 	my $mangle   = $m->{backups}[$i]{mangle};
@@ -120,7 +120,7 @@
             $sharePathM = $share . $dir;
         }
         $path .= $sharePathM;
-#print(STDERR "Opening $path (share=$share, mangle=$mangle)\n");
+        #print(STDERR "Opening $path (share=$share, mangle=$mangle)\n");
 
         my $dirOpts    = { %{$m->{dirOpts} || {} } };
         my $attribOpts = { compress => $compress };
@@ -169,7 +169,7 @@
                 # skip directories in earlier backups (each backup always
                 # has the complete directory tree).
                 #
-                next if ( $i < $m->{idx} && $a->{type} == BPC_FTYPE_DIR && $m->{backups}[$m->{idx}]{type} != "partial" );
+                next if ( $i < $m->{idx} && $a->{type} == BPC_FTYPE_DIR );
 		$attr->set($fileUM, undef);
             } else {
                 #
@@ -222,7 +222,6 @@
                                                     if ( $m->{dirOpts}{nlink} );
 	    $m->{files}{$fileUM}{inode}       = $entry->{inode}
                                                     if ( $m->{dirOpts}{inode} );
-#print(STDERR "add $m->{files}{$fileUM}{fullPath}\n");
         }
 	#
 	# Also include deleted files

--- usr/share/backuppc/lib/BackupPC/CGI/EditConfig.pm	2010-03-12 22:30:39.000000000 +0100
+++ usr/share/backuppc/lib/BackupPC/CGI/_original/EditConfig.pm	2009-06-03 12:05:55.000000000 +0200
@@ -287,7 +287,6 @@
 	    {name => "FullKeepCnt"},
 	    {name => "FullKeepCntMin"},
 	    {name => "FullAgeMax"},
-	    {name => "FullCntYearly"},
 
 	    {text => "CfgEdit_Title_Incremental_Backups"},
 	    {name => "IncrPeriod"},
@@ -305,7 +304,6 @@
 
 	    {text => "CfgEdit_Title_Other"},
 	    {name => "PartialAgeMax"},
-	    {name => "useEveryPartial"},
 	    {name => "RestoreInfoKeepCnt"},
 	    {name => "ArchiveInfoKeepCnt"},
 	    {name => "BackupZeroFilesIsFatal"},
@@ -370,9 +368,6 @@
         ErrorExit(eval("qq{$Lang->{Only_privileged_users_can_edit_config_files}}"));
     }
 
-    # Debian: ClientNameAlias is too dangerous, disable it
-    $bpc->{Conf}{CgiUserConfigEdit}{ClientNameAlias} = 0;
-
     if ( defined($In{menu}) || $In{saveAction} eq "Save" ) {
 	$errors = errorCheck();
 	if ( %$errors ) {

--- usr/share/backuppc/lib/BackupPC/Config/Meta.pm	2009-12-21 00:13:38.000000000 +0100
+++ usr/share/backuppc/lib/BackupPC/Config/_original/Meta.pm	2009-06-03 12:05:55.000000000 +0200
@@ -136,7 +136,6 @@
     },
     FullKeepCntMin	=> "integer",
     FullAgeMax		=> "float",
-    FullCntYearly		=> "integer",
     IncrKeepCnt	 	=> "integer",
     IncrKeepCntMin	=> "integer",
     IncrAgeMax		=> "float",
@@ -145,7 +144,6 @@
 	    child  => "integer",
     },
     PartialAgeMax	=> "float",
-    useEveryPartial 	=> "boolean",
     BackupsDisable      => "integer",
     IncrFill	 	=> "boolean",
     RestoreInfoKeepCnt	=> "integer",
@@ -368,13 +366,11 @@
                 FullKeepCnt               => "boolean",
                 FullKeepCntMin            => "boolean",
                 FullAgeMax                => "boolean",
-                FullCntYearly                => "boolean",
                 IncrKeepCnt               => "boolean",
                 IncrKeepCntMin            => "boolean",
                 IncrAgeMax                => "boolean",
                 IncrLevels                => "boolean",
                 PartialAgeMax             => "boolean",
-                useEveryPartial           => "boolean",
                 IncrFill                  => "boolean",
                 RestoreInfoKeepCnt        => "boolean",
                 ArchiveInfoKeepCnt        => "boolean",

--- usr/share/backuppc/lib/BackupPC/Xfer/Rsync.pm	2010-02-13 19:21:18.000000000 +0100
+++ usr/share/backuppc/lib/BackupPC/Xfer/_original/Rsync.pm	2009-06-03 12:05:55.000000000 +0200
@@ -233,17 +233,11 @@
 	    }
         } else {
             $incrDate = $bpc->timeStamp($t->{incrBaseTime}, 1);
-	    if ( $t->{partialNum} ) {
-		$logMsg = "incr backup started back to $incrDate"
-                    . " (backup #$t->{incrBaseBkupNum}) for directory $t->{shareName};"
-		        . " updating partial #$t->{partialNum}";
-	    } else {
-                $logMsg = "incr backup started back to $incrDate"
-                        . " (backup #$t->{incrBaseBkupNum}) for directory"
-                        . " $t->{shareName}";
-            }
+            $logMsg = "incr backup started back to $incrDate"
+                    . " (backup #$t->{incrBaseBkupNum}) for directory"
+                    . " $t->{shareName}";
         }
-
+        
         #
         # A full dump is implemented with --ignore-times: this causes all
         # files to be checksummed, even if the attributes are the same.

--- usr/share/backuppc/lib/BackupPC/Xfer/RsyncFileIO.pm	2010-03-30 22:51:48.000000000 +0200
+++ usr/share/backuppc/lib/BackupPC/Xfer/_original/RsyncFileIO.pm	2009-06-03 12:05:55.000000000 +0200
@@ -84,7 +84,7 @@
 					 $fio->{backups});
     $fio->{full}     = $fio->{xfer}{type} eq "full" ? 1 : 0;
     $fio->{newFilesFH} = $fio->{xfer}{newFilesFH};
-#    $fio->{partialNum} = undef if ( !$fio->{full} );
+    $fio->{partialNum} = undef if ( !$fio->{full} );
     return $fio;
 }
 
@@ -162,12 +162,6 @@
                                      $defBlkSize, $fio->{checksumSeed},
                                      0, $attr->{compress}, 0,
                                      $fio->{protocol_version});
-        if ( $err ) {
-            $fio->log("Can't get rsync digests in phase $phase from $attr->{fullPath}"
-                    . " (err=$err, name=$f->{name})");
-            $fio->{stats}{errorCnt}++;
-            return -1;
-        }
         my($isCached, $isInvalid) = $d->isCached;
         if ( $fio->{logLevel} >= 5 ) {
             $fio->log("$attr->{fullPath} verify; cached = $isCached,"
@@ -353,22 +347,17 @@
     }
     $shareM .= "/$dir" if ( $dir ne "" );
 
-#print(STDERR "\nlooking for $fname in $shareM\n");
-
     if ( $noCache ) {
         $share  = $fio->{share} if ( !defined($share) );
         my $dirAttr = $fio->{view}->dirAttrib($fio->{viewNum}, $share, $dir);
         $attr = $dirAttr->{$fname};
     } else {
         $fio->viewCacheDir($share, $dir);
-        if ( defined($attr = $fio->{partialCache}{$shareM}{$fname}) ) {
-            $partial = 1;
-#print(STDERR "found $fio->{partialCache}{$shareM}{$fname}{fullPath}\n");
-        } elsif ( defined($attr = $fio->{viewCache}{$shareM}{$fname}) ) {
+        if ( defined($attr = $fio->{viewCache}{$shareM}{$fname}) ) {
             $partial = 0;
-#print(STDERR "found $fio->{viewCache}{$shareM}{$fname}{fullPath}\n");
+        } elsif ( defined($attr = $fio->{partialCache}{$shareM}{$fname}) ) {
+            $partial = 1;
         } else {
-#print(STDERR "not found -> create\n");
             return;
         }
         if ( $attr->{mode} & S_HLINK_TARGET ) {

--- usr/share/backuppc/bin/BackupPC_dump	2011-03-09 22:26:09.000000000 +0100
+++ usr/share/backuppc/bin/_original/BackupPC_dump	2009-06-03 12:05:55.000000000 +0200
@@ -182,7 +182,6 @@
 $SIG{STOP} = \&catch_signal;
 $SIG{TSTP} = \&catch_signal;
 $SIG{TTIN} = \&catch_signal;
-$SIG{IO} = \&write_status;
 my $Pid = $$;
 
 #
@@ -393,16 +392,19 @@
 for ( my $i = 0 ; $i < @Backups ; $i++ ) {
     $needLink = 1 if ( $Backups[$i]{nFilesNew} eq ""
                         || -f "$Dir/NewFileList.$Backups[$i]{num}" );
-     if ( $Backups[$i]{type} eq "full" ) {
+    if ( $Backups[$i]{type} eq "full" ) {
         $incrCntSinceFull = 0;
         $lastBkupNum = $Backups[$i]{num};
         $lastIdxByLevel[0] = $i;
-        $lastFullTime = $Backups[$i]{startTime} if ( $lastFullTime < $Backups[$i]{startTime} );
+	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} );
+        $lastIncrTime = $Backups[$i]{startTime}
+                if ( $lastIncrTime < $Backups[$i]{startTime} );
     } elsif ( $Backups[$i]{type} eq "partial" ) {
         $partialIdx     = $i;
         $lastPartial    = $Backups[$i]{startTime};
@@ -414,13 +416,10 @@
 #
 # Decide whether we do nothing, or a full or incremental backup.
 #
-my $lastYear;
-($sec,$min,$hour,$mday,$mon,$lastYear,$wday,$yday,$isdst) = localtime($lastFullTime);
 if ( @Backups == 0
         || $opts{f}
-        || (!$opts{i} && ((time - $lastFullTime > $Conf{FullPeriod} * 24*3600
-            && time - $lastIncrTime > $Conf{IncrPeriod} * 24*3600)
-            || ($Conf{FullCntYearly} > 0 && $year > $lastYear))) ) {
+        || (!$opts{i} && (time - $lastFullTime > $Conf{FullPeriod} * 24*3600
+            && time - $lastIncrTime > $Conf{IncrPeriod} * 24*3600)) ) {
     $type = "full";
     $incrLevel = 0;
     $incrBaseBkupNum = $lastBkupNum;
@@ -444,7 +443,7 @@
                 || $Backups[$idx]{startTime} > $incrBaseTime ) {
             $incrBaseBkupNum = $Backups[$idx]{num};
             $incrBaseLevel   = $Backups[$idx]{level};
-            $incrBaseTime    = $Backups[$idx]{startTime} if ($Backups[$idx]{type} ne "partial");
+            $incrBaseTime    = $Backups[$idx]{startTime};
         }
     }
     #
@@ -454,8 +453,6 @@
     if ( !defined($incrBaseBkupNum) || $incrLevel < 1 ) {
         $type = "full";
         $incrBaseBkupNum = $lastBkupNum;
-    } elsif ( $Backups[$incrBaseBkupNum]{type} eq "partial" ) {
-        $incrLevel = $incrBaseLevel
     }
 } else {
     NothingToDo($needLink);
@@ -527,14 +524,13 @@
 }
 
 #
-# Ignore the partial dump in the case of an incremental and $Conf{useEveryPartial} not set
-# or when the last backup isn't a partial or when the partial is too old.
+# Ignore the partial dump in the case of an incremental
+# or when the partial is too old.  A partial is a partial full.
 #
-if ( (!$Conf{useEveryPartial} && $type ne "full") || $incrBaseBkupNum > $partialNum || time - $lastPartial > $Conf{PartialAgeMax} * 24*3600 ) {
+if ( $type ne "full" || time - $lastPartial > $Conf{PartialAgeMax} * 24*3600 ) {
     $partialNum = undef;
     $partialIdx = -1;
 }
-#print( STDERR "IncLevel=$incrLevel, LastSuccess=$incrBaseBkupNum, LastPartial=$partialNum\n" );
 
 #
 # If this is a partial, copy the old XferLOG file
@@ -1018,16 +1014,7 @@
     print("link $clientURI\n") if ( $needLink );
     exit(0);
 }
-sub write_status
-{
-    my $sigName = shift;
-    my $client = shift;
-    my $newStat = $xfer->getStats;
 
-#    print( STDERR "Signal ILL catched" );
-#    syswrite( STDERR, "$sigName, $client" );
-    return;
-}
 sub catch_signal
 {
     my $sigName = shift;
@@ -1151,10 +1138,8 @@
     # up some files.  If the prior backup was a partial too, we
     # only keep this backup if it has more files than the previous
     # partial.
-    # We keep this backup too if useEveryPartial is configured and we
-    # backed up some files, independend if it was an incremental or full.
     #
-    if ( $type eq "full"  || $Conf{useEveryPartial} ) {
+    if ( $type eq "full" ) {
 	if ( $nFilesTotal == 0 && $xfer->getStats->{fileCnt} == 0 ) {
 	    #
 	    # Xfer didn't report any files, but check in the new
@@ -1164,15 +1149,14 @@
         }
         my $str;
         if ( $nFilesTotal > $partialFileCnt
-                || $xfer->getStats->{fileCnt} > $partialFileCnt
-                || ($Conf{useEveryPartial} && ($nFilesTotal>0 || $xfer->getStats->{fileCnt}>0)) ) {
+                || $xfer->getStats->{fileCnt} > $partialFileCnt ) {
             #
             # If the last backup wasn't a partial then
             # $partialFileCnt is undefined, so the above
             # test is simply $nFilesTotal > 0
             #
 	    $keepPartial = 1;
-            if ( $Conf{useEveryPartial} || $partialFileCnt ) {
+            if ( $partialFileCnt ) {
                 $str = "Saving this as a partial backup\n";
             } else {
                 $str = sprintf("Saving this as a partial backup, replacing the"
@@ -1299,7 +1283,7 @@
         #
 	# First make sure that $Conf{FullAgeMax} is at least bigger
 	# than $Conf{FullPeriod} * $Conf{FullKeepCnt}, including
-	# the exponential array case and not less than $Conf{FullCntYearly}
+	# the exponential array case.
         #
 	my $fullKeepCnt = $Conf{FullKeepCnt};
 	$fullKeepCnt = [$fullKeepCnt] if ( ref($fullKeepCnt) ne "ARRAY" );
@@ -1311,7 +1295,6 @@
 	    $fullPeriod *= 2;
 	}
 	$fullAgeMax += $fullPeriod;	# add some buffer
-        $fullAgeMax = $Conf{FullCntYearly}*366 if ( $Conf{FullCntYearly}*366 > $fullAgeMax );
 
         if ( $cntFull > $Conf{FullKeepCntMin}
                && $oldestFull > $Conf{FullAgeMax}
@@ -1383,18 +1366,7 @@
         # since it is needed for restore.
         #
         my $noDelete = $i + 1 < @$Backups ? $Backups->[$i+1]{noFill} : 0;
-	#
-	# Don't delete any full that is the first full of a year
-	#
-        if ( !$noDelete && $Conf{FullCntYearly} > 0 ) {
-            my ($sec,$min,$hour,$mday,$mon,$bckyear,$wday,$yday,$isdst) = localtime($Backups->[$i]{startTime});
-            if ( $k > 0 ) {
-                my ($sec,$min,$hour,$mday,$mon,$prevyear,$wday,$yday,$isdst) = localtime($Backups->[$prevFull]{startTime});
-                $noDelete = 1 if ( $prevyear < $bckyear );
-            } else {
-                $noDelete = 1;
-            }
-        }
+
         if ( !$noDelete && 
               ($fullKeepIdx >= @$fullKeepCnt
               || $k > 0
@@ -1447,25 +1419,12 @@
     my @Backups = $bpc->BackupInfoRead($client);
     my $num  = -1;
     my $newFilesFH;
-    my $prev = @Backups-1;
-    $prev=0 if ( $prev < 0 );
-    #
-    # If we close a series of partial backups we get the starttime from the first
-    # partial backup.
-    #
-    if ( $Conf{useEveryPartial} && $type ne "partial" && $Backups[$prev]{type} eq "partial") {
-        for ( my $i = @Backups - 1 ; $i >= 0 ; $i-- ) {
-            $startTime = $Backups[$i]{startTime} if ( $Backups[$i]{type} eq "partial" );
-        }
-    }
+
     #
     # Since we got a good backup we should remove any partial dumps
-    # But if $Conf{useEveryPartial} is set and this new backup is a partial
-    # or it is an incremental and the previous is a partial, we need the
-    # old partial to fill the new one with files which would be
-    # backed up from this previous partial.
+    # (the new backup might also be a partial, but that's ok).
     #
-    BackupPartialRemove($client, \@Backups) if ( $Conf{useEveryPartial} ? $Backups[$prev]{type} ne "partial" : $type ne "partial" );
+    BackupPartialRemove($client, \@Backups);
     $needLink = 1 if ( -f "$Dir/NewFileList" );
 
     #
@@ -1500,7 +1459,7 @@
     $Backups[$i]{sizeExistComp} = $sizeExistComp;
     $Backups[$i]{tarErrs}       = $tarErrs;
     $Backups[$i]{compress}      = $Conf{CompressLevel};
-    $Backups[$i]{noFill}        = $type eq "full" ? 0 : 1;
+    $Backups[$i]{noFill}        = $type eq "incr" ? 1 : 0;
     $Backups[$i]{level}         = $incrLevel;
     $Backups[$i]{mangle}        = 1;     # name mangling always on for v1.04+
     $Backups[$i]{xferMethod}    = $Conf{XferMethod};

--- usr/share/backuppc/bin/BackupPC_link	2010-03-31 08:26:44.000000000 +0200
+++ usr/share/backuppc/bin/_original/BackupPC_link	2009-06-03 12:05:55.000000000 +0200
@@ -127,31 +127,18 @@
     # a compressed incremental if the most recent filled in dump
     # is not compressed.
     #
-    # Furthermore we have to fill a finalized incremental with
-    # all previous partials because the partials will be removed during
-    # next backup
-    #
     my $noFill = 1;
     my $fillFromNum;
-    my $i;
-    my $prevDump;
-    if ( $Backups[$num]{type} eq "full" ) {
+    if ( $Backups[$num]{type} ne "incr" ) {
         $noFill = 0
-    } elsif ( $Backups[$num]{type} eq "incr" && $Backups[$num-1]{type} eq "partial" ) {
-        for ( $i = $num - 1 ; $i >= 0 ; $i-- ) {
-            last if ( $Backups[$i]{type} ne "partial"
-                          || ($Backups[$i]{compress} ? 1 : 0)
-                                       != ($Compress ? 1 : 0) );
-            $prevDump = "$Dir/$Backups[$i]{num}";
-            find({wanted => \&FillIncr, no_chdir => 1}, $prevDump) if ( -d $prevDump );
-        }
     } elsif ( $Conf{IncrFill} ) {
+        my $i;
         for ( $i = $num - 1 ; $i >= 0 ; $i-- ) {
             last if ( !$Backups[$i]{noFill}
                           && ($Backups[$i]{compress} ? 1 : 0)
                                        == ($Compress ? 1 : 0) );
         }
-        $prevDump = "$Dir/$Backups[$i]{num}";
+        my $prevDump = "$Dir/$Backups[$i]{num}";
         if ( $i >= 0 && -d $prevDump ) {
             find({wanted => \&FillIncr, no_chdir => 1}, $prevDump);
             $noFill = 0;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.