Delete backup logs when backup job is executed

Hello,

Right now there is one setting for backup log retention in Virtualmin configuration Backup settings. It is typical to have multiple backup job with different retention periods. Can we add the ability to delete logs per job older-than? Like you currently do for files using srftime?

As a simple example running daily incremental, weekly full and monthly full backups keeping the monthly for 6 months - you would have ~180 log files with most of them irrelevant. About 99% of the daily backup no longer exist (7 day retention) and 80%-85% of the weekly's would be gone too (1 month retention). Out of 180 backup logs only 18 would have associated backup files to restore.

It would be nice to prune the logs so only "active" or relevant ones remained.

Thanks!
-- Craig

Status: 
Closed (fixed)

Comments

I suppose this could be done, but those logs are pretty small - only a single file of less than 1 kb per instance.

It's not disk space but rather having relevant logs to view. Having a log that can't be restored (the backup file doesn't exist anymore). Really only necessary to keep log files of backups that exist.
-- Craig

Ok, in the next Virtualmin release (which will be version 5.0), I will add a configuration option to enable deletion of logs when the corresponding scheduled backup is removed.

Automatically closed -- issue fixed for 2 weeks with no activity.