These log files will be removed when the obsolete backup record is removed from your database, OR when you select a backup record and click on Delete Files (it deletes any locally stored backup archives and log files).
Knowing that, you can see that the only method available to you inside Akeeba Backup is using the obsolete records feature under Quota management. This runs at the end of each backup and is fine for 99% of our users.
If you have a fairly complex backup setup, the obsolete records quota may end up deleting more than you hoped for. Remember, remotely stored records are also reaped by this feature which may result in old records of remotely stored backups to disappear from Manage Backups. If this is the case, the solution is to use a CRON job on your server to automatically delete older backup log files. For example, I'm using something along the following lines on the server of one of my sites with a very convoluted backup history: find /path/to/my/backups/directory -type f -name 'akeeba.*.log.php' -ctime +6
which deletes any log files in my /path/to/my/backups/directory
which are older than 7 days old. The idea here is that I do have old backup archives from a year ago still stored in remote storage which I don't want to be reaped by the obsolete records quota, BUT I also don't want to keep backup log files older than 7 days as I have no practical use for them. Hence my use of a CRON job to remove them from the filesystem without touching my backup records in the database!
Note: you may thought I made a typo, but -ctime
is tricky. As per its documentation: "When find figures out how many 24-hour periods ago the file was last accessed, any fractional part is ignored, so to match -ctime +6
, a file has to have been accessed at least seven days ago". In plain English, +6
means "more than 6 days old", i.e. 7 or more days old.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!