--- BackupManager.py.orig 2010-06-22 17:17:32.444576825 +0200 +++ BackupManager.py 2010-06-22 17:35:14.035201397 +0200 @@ -526,6 +526,7 @@ """ # Get the list of snapshots that matches the latest snapshot format listing = self.__snpman.get_snapshots() + agelimit = int(self.config.get("general","maxincrement")) base = None if len(listing) == 0 : @@ -538,11 +539,13 @@ if listing[0].isfull() : # Last backup was full backup self.logger.debug("Last (%s) was a full backup" % listing[0].getName()) d = listing[0].getDate() - if ( datetime.date.today() - datetime.date(d["year"],d["month"],d["day"]) ).days < self.config.get("general","maxincrement") : + age = (datetime.date.today() - datetime.date(d["year"],d["month"],d["day"]) ).days + if age < agelimit : # Less than maxincrement days passed since that -> make an increment + self.logger.info("Last full backup is %i days old < %s -> make inc backup" % (age, agelimit )) increment = True else: - self.logger.info("Last full backup is old -> make a full backup") + self.logger.info("Last full backup is %i days old > %s -> make full backup" % (age, agelimit )) increment = False # Too old -> make full backup else: # Last backup was an increment - lets search for the last full one self.logger.debug(" Last backup (%s) was an increment - lets search for the last full one" % listing[0].getName()) @@ -550,7 +553,7 @@ if i.isfull(): d = i.getDate() age = (datetime.date.today() - datetime.date(d["year"],d["month"],d["day"]) ).days - if age < int(self.config.get("general","maxincrement")) : + if age < agelimit : # Last full backup is fresh -> make an increment self.logger.info("Last full backup is fresh (%d days old )-> make an increment" % age ) increment = True