Hi,
Thanks for the script. So CWP newbackup GUI doesn't have option to automatically retentate old backups? As per the screenshot, I do see there's option to choose from Daily Backup Retention, Weekly Backup Retention and Monthly Backup Retention. I have just enabled Weekly Backup Retentaton on Sunday. Will it generate a weekly backup on every Sunday or delete old backups on Sunday?
https://imgur.com/a/7v3rGOZ
Screenshot added as reference. Thanks.
No, the developers don't understand what the word retention means - it is not correct; the GUI just means enabled.
Alternatively, they may have intended the tick boxes to mean "keep indefinitely" but that doesn't appear to be working either and is lacking in functionality.
This is why I directed you to the custom script, that finds old files and deletes them, based on the retention value. You could extract that portion to a separately run cron task, if you didn't wish to use the complete script. You could have different retention values applied to daily, weekly & monthly backups, by individually specifying the relevant backup subdirectory.
Ideally, with a correctly implemented backup scheduler, you should be able to specify, for example:
Keep 2 weeks of daily backups, 6 months of weekly backups and 5 years of monthly backups.
Lengthy backup retention is mandatory for some business types.