def test_checkForKeepDays(self):
     keep = 1
     maint.checkForKeepDays(self._backupHome, keep)
     self.assertEqual(
         self.getNonDeleteCount(),
         keep,
         "Wrong number of backup images kept.")
Beispiel #2
0
def runMaintenanceFunctions(bkHome, settings, outputWriter):
    """
    Execute maintenance functions that are intended to be ran after a
    successful backup has been performed.
    """
    settings.reduceBackups and organize(bkHome)
    settings.keepDays and maint.checkForKeepDays(bkHome, settings.keepDays)
    settings.maxImages and maint.checkMaxImages(bkHome, settings.maxImages)
    maint.deleteBackupsMarkedForDeletion(bkHome, outputWriter)