Support

Akeeba Backup for Joomla!

#41904 Prune old and bad backup references

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.3.0
PHP version
8.2.28
Akeeba Backup version
10.0.3

Latest post by nicholas on Monday, 12 May 2025 05:58 CDT

dsic-se-support-web

Hello,

We use a Joomla site as a template to deploy new Joomla instances for our customers. The deployment relies on Akeeba backup as follows:

- Full backup of the template website;

- Export the backup file;

- Create a new, blank Joomla instance;

- Restore the exported backup file to the new instance.

This works well, but we've noticed that the old backups performed regularly on the template website are also displayed on the new instance and cannot be deleted because the path references are incorrect.

Is it possible to prune these incorrect backup references from new instances created from the template site?

Best regards,

Eric

nicholas
Akeeba Staff
Manager

You can remove all backup records from the database at backup time. Go to Akeeba Backup. Select the backup profile you are interested in. Go to Database Tables Exclusion. Find the #__akeebabackup_backups table and click the second icon ("Do not backup its contents") to make it active (yellow / orange background). This will back up the table structure so that Akeeba Backup can still work, but leave out the backup records so you don't see them on the new instances.

Side note: If I remember correctly the latest backup, the one you are currently taking, will still be included in the backup archive. Please note that this is off the top of my head, I have not looked at the code to confirm this, and it's been quite a while since I last refactored that code.

You can do that for #__akeebabackup_profiles, though the first time you launch Akeeba Backup on the new instance it might show an error because it expected the default backup profile (id 1) and found none. However, when this happens we also save the default, factory-reset configuration state as the default backup profile which should mean that reloading the page will now let Akeeba Backup work.

With these two changes you will effectively have the equivalent of a brand new installation of Akeeba Backup on your new instance.

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!

dsic-se-support-web

Hello Nicholas and thank you for your quick reply.

In fact, we are using a dedicated Akeeba backup profile to do the backup job before using it on a brand new installation. It seems it's not possible to set a database table exclusion for a given profile. The database exclusion is for all backup profiles.

Can you confirme this please ?

Regards,

Eric

dsic-se-support-web

Hello again,

In addition of my previous reply, could please you give us the SQL request we could use to clean up the akeebabackup_backups tables from our ancient instances ?

Regards,

Eric

nicholas
Akeeba Staff
Manager

You can delete all backup records with TRUNCATE TABLE #__akeebabackup_backups where #__ is the table name prefix of the site.

If you have newer backups, use phpMyAdmin (or something similar) to see the contents of that table, and delete the older records. I wouldn't know how to find them, as "older records" is very much dependent on when you restored the site and when you took a new backup.

You can of course just log into your site, go to Akeeba Backup, Manage Backups, select the older records and click on Actions, Delete. It is directly equivalent to managing the database table directly.

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!

dsic-se-support-web

Unfortunatly, using Akeeba's GUI to delete old records (whose status is marked as "obsolete") does not work. No error message is displayed when deleting after selecting an old backup, but PHP error logs indicates errors due to "incorrect backup path".

That's the reason why we need to manually prune the database.

Thank you.

nicholas
Akeeba Staff
Manager

There are similarly named actions in the Actions drop-down: Delete Files and Delete. You must use the latter (Delete), right at the bottom of the Actions drop-down. Their difference is documented.

Delete Files only deletes locally stored files associated with the backup record. This is an obsolete record. An obsolete record is a record which does not have any locally or remotely stored files associated with it. Therefore, by definition, Delete Files will have no effect on it.

Delete removes the backup record itself. If there are locally stored files associated with it Akeeba Backup will perform a Delete Files on it, then delete the database record. If there are no locally stored files associated with it Akeeba Backup will just delete the database record.

I know this works as I am using it on a daily basis. Developing this software means that I may run dozens of backups in a short period of time. I don't enjoy having a thousand junk records in the database; I select them when I am done working on the backup engine and click on Delete. I actually did that just twenty minutes before this reply, and it of course worked :)

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!

dsic-se-support-web

I'm confused... Of course, you are right. Using "Delete" instead of "Delete files" works fine.

Sorry for misunderstanding.

Thank you very much for your help.

Regards,

Eric

nicholas
Akeeba Staff
Manager

No worries! We've all made that exact mistake – even those of us who should really know better :)

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!