Support

Akeeba Backup for Joomla!

#42565 Synchronising removal of log files with new JPA file creation

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.4.1
PHP version
8.3.28
Akeeba Backup version
10.2.1

Latest post by nicholas on Thursday, 18 December 2025 07:46 CST

tapiochre

I'm happily using Akeeba to perform weekly backups on my website. I am configured so that three backups are retained and this is workinhg well.

However, what I am confused by is the fact that the number of ***log.php files are not removed at the same time as old JPA files. The result is that I can see several dozen of these log files going back to 2024 when, in actual fact, I would expect to see only the most recent log files associated with the creation of the JPA files themselves.

I've hunted around but can't find any configuration setting to set the system to automatically synchronise deletion of old log files with old JPA files.

Am I missing something, or is this something that you can guide me on?

nicholas
Akeeba Staff
Manager

The log files will only be removed automatically when the backup record itself is removed. If you are okay with the backup record being removed from the database, the option in the backup profile's Configuration page you're looking for is called Obsolete Records To Keep.

There is a reason for this. Log deletion and file deletion are very different things. If you have a problem it does help having the log of the last known good backup even if you no longer have the backup archive files themselves. When you delete the backup record, though, it definitely means you are done with this backup attempt; you don't want the software to even remember it exists, which makes log files redundant by definition.

Alternatively, you can set up a CRON job using the standard Linux command find to delete log files based on their age (how long ago they were created). The command line would look like this:

find /home/example/public_html/administrator/components/com_akeebabackup/backup -type f -name '*.log.php' -mtime +30 -delete > /dev/null 2>&1

The /home/example/public_html/administrator/components/com_akeebabackup/backup part is the absolute filesystem path to your backup output directory.

The +30 part is the minimum age of the files, in days. The + in front is mandatory. +30 means "anything that 30 days old or even older".

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!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!