Webmin自动备份清理

I am using Webmin to backup automatically every day. I want to automatically delete all backups older then 7 days, unless they are every 15 days. I guess I need to write some sort of bash script to do this, does anyone know of a way built into webmin, or a script that does this already.

Summary: - Daily Backups are already being made. - Backups need to be retained for 7 days from current date, and removed otherwise UNLESS it is every 15 days.

Thanks

One liner to remove files more than 7 days old:

find ${path_to_files} -daystart -maxdepth 1 -mtime +7 -exec rm -rf {} \; &>/dev/null

Maybe you could adapt it to your needs, by ignoring the files exactly x%15 days old...