Delete old backups

Is there a way to delete the old backups after a certain age when using the backup utility of FreePBX, kinda like the rotate log file?


I run a custom cron script to do that.

If you Google ‘script to delete files after one week’ or similar, there are lots of examples. Choose one that suits you.

I use this script in a weekly cron job (/etc/cron.weekly) to delete files older than 30 days.

#!/bin/sh /usr/bin/find /var/lib/asterisk/backups/ -depth -type f -mtime +30 | /usr/bin/xargs /bin/rm -f >/dev/null 2>&1

Thought it might turn out to be a cron job. Thanks for the info.