Calculate the number of backups to delete


Problem: System Cleanup

Scenario: In the above scenario, your system disk will be filled up eventually without cleaning up the old backups. Therefore, in this optional task, create a script that checks the number of backups you created in Task A. If the number of the backup file is more than a pre-detined threshold. the script wi delete the old archives to maintain the backups under a reasonable size.

This script should do the following:

i. Count the number of backups created in Task A and determine if this number is larger than 3.
ii. Nothing should happen if the number of backups is less than the threshold, 3.
iii. If more backup archives are detected, calculate the number of backups to delete. Then delete the old archives.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Calculate the number of backups to delete
Reference No:- TGS03345634

Expected delivery within 24 Hours