Here is a working and improved version (tested on Debian Lenny).
sitebackups.php (Size: 3.08 KB / Downloads: 18)
Obviously previous version threw an error and didn't delete the file on some systems, because file name is the 8th and not 9th parameter in the ls -lrt output.
I've also added an
--color=never switch, because colors could cause problems with the file names on some systems.
Oh, and if you don't want your crontab log file to be filled with the script output, use this cron entry:
Quote:0 4 * * * root /var/www/ispcp/engine/backup/sitebackups.php > /dev/null
Regards