Dan D Niles writes:
> I tracked down the bug. When I changed the config file, it caused
> a problem where something wasn't defined that should have been.
> I uncommented the line
Eeeek! This is a serious bug. Thanks for tracking it down.
The problem is that when it removes multiple fulls in one
go (which can happen when you change $Conf{FullKeepCnt}),
it goes through the BackupPC list in the wrong order on
the final pass. The fix is to replace a push() with an
unshift(), but I also added error checking to BackupRemove()
like you did just to make sure. I've attached a patch.
I'll be releasing a new version BackupPC 2.1.2 shortly with this
fix, the BackupPC_tarCreate hardlink typo, and miscellaneous
other fixes.
Craig
--- bin/BackupPC_dump 2005-03-13 09:15:48.000000000 -0800
+++ bin/BackupPC_dump 2005-09-05 15:40:50.207454296 -0700
@@ -1196,8 +1201,8 @@
#
# Delete the full backup
#
- #printf("Deleting backup $i ($prevFull)\n");
- push(@delete, $i);
+ #print("Deleting backup $i ($prevFull)\n");
+ unshift(@delete, $i);
} else {
$fullCnt++;
while ( $fullKeepIdx < @$fullKeepCnt
@@ -1338,6 +1343,11 @@
my($client, $Backups, $idx) = @_;
my($Dir) = "$TopDir/pc/$client";
+ if ( $Backups->[$idx]{num} eq "" ) {
+ print("BackupRemove: ignoring empty backup number for idx $idx\n");
+ return;
+ }
+
$bpc->RmTreeDefer("$TopDir/trash",
"$Dir/$Backups->[$idx]{num}");
unlink("$Dir/SmbLOG.$Backups->[$idx]{num}")
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/