The intention was to make sure the backup number always represents the same backup. So in the successful case, the new backup is N+1 and the prior deltas stored at N correctly represent that prior backup.
In the failure case and the prior backup deltas are empty, it removes the empty delta. I also intended to renumber N+1 back to N, but in looking at the code it doesn't appear to do so. There is a comment at the top of bin/BackupPC_dump which says: # If the dump fails with no files backed up, then $TopDir/pc/$client/{$M+1} # is renamed back to $TopDir/pc/$client/$M and # $TopDir/pc/$client/XferLOG{$M+1}.z is renamed to # $TopDir/pc/$client/XferLOG.bad.z for later viewing. ...but I don't think it does that, as you observe. For the case you mention, what is the contents of this log line in XferLOG: BackupFailCleanup: nFilesTotal = $nFilesTotal, type = $type, BackupCase = $BackupCase, inPlace = $inPlace, lastBkupNum = $lastBkupNum I'm presuming nFilesTotal is 0 and the type is 4. Craig On Fri, Feb 5, 2021 at 2:28 AM <backu...@kosowsky.org> wrote: > When backups number N is initiated, it is initially labeled as > 'active'. If interrupted, it is labeled as 'partial'. > Then when a backup is tried again, it is numbered 'N+1' and again > labeled as 'active'. This proceeds ad-infinitum until a successful > backup is completed. > > The result can be large and seemingly needless holes in the backup > numbering -- even in the course of a single day. > > This happens frequently with laptops that may not always be connected > to the network. > > Is there any compelling reason for this behavior? > > This could easily be fixed either at the end of an aborted backup or > at the beginning of the next backup attempt by simply decrementing the > last entry in the 'backup' file and by renumbering the partial > directory and the associated log file. > > Thanks, > Jeff >
_______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/