Cron To Delete Oldest Daily Backup Directory

HappyPappy

Active Member
Mar 17, 2002
44
0
306
Hi everyone,

I would like to first say thank you to cpanel for their new backup system. Boy of boy what an improvement.

I can't seem to come up with the right cron code to delete only the oldest daily backup directory just before the backup process starts. I have some other files in the "backup" directory so the cron code must only delete the daily backup directory that is three days old.

I know cpanel deletes the oldest daily backup directory after it has saved the latest one but this amounts to needing space to accommodate an extra daily backup directory for only a few minutes before it is deleted.

But if I delete the oldest daily backup directory first then I can safely fit an extra daily backup in my 250GB backup disk.

Any help would be appreciated.