Support

Akeeba Backup for Joomla!

#42423 Backup a database other than the one used by Joomla?

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
6
PHP version
8.4
Akeeba Backup version
10.1

Latest post by stavrosz on Tuesday, 04 November 2025 04:04 CST

stavrosz

Are we now able to easily backup another database, without including the site's main database?

In profile configuration we now have the following two options only:

  • Main site database only (SQL file)
  • All configured databases (archive file)

I guess that we could create a profile for "All configured databases" and then in the "Database Tables Exclusion" painstakingly exclude all the main database's tables (though we won't get an SQL file). But then again, future Joomla and extension updates may introduce new tables forcing us to check the "Database Tables Exclusion" every time we do an update. I confess I don't know how to use the "RegEx Database Tables Exclusion" for excluding all tables of a database, nor do I know whether it would work automatically for future table additions.

Instead, is it possible you add the following option in a future version of Akeeba Backup?:

  • Single selected database (SQL file)     -->   ability to select a  database (from those we specified in the "Multiple Database Definitions")

Even further, you could offer us an additional option for selecting more than one database:

  • Selected databases (archive file)     -->   ability to select any number of databases (from those we specified in the "Multiple Database Definitions") and possibly even the main database itself too.

nicholas
Akeeba Staff
Manager

There is a simpler way to do it which has already been possible for over a decade. It's a very rarely used feature, as most people don't have a use case where they want to back up just one non-Joomla database and want to do that with Akeeba Backup instead of a CRON job which runs the mysql or mariadb command line directly.

Create a new backup profile.

Set the Backup Type to "Main Site Database Only (SQL File)" or "All Configured Databases (Archive File)" depending on what you're trying to do. Remember, the "Main Site Database Only (SQL File)" backup type cannot be restored directly; you have to use phpMyAdmin or something similar to restore the generated .sql file. The "All Configured Databases (Archive File)" option creates a backup archive with a restoration script, which means you can restore it directly.

Under "Site overrides" set "Site database override" to Yes. Database connection options now appear below it.

Enter the connection information to your non-Joomla database.

Save & Close and Take a backup.

The idea here is that you tell Akeeba Backup to substitute the site's main database with the connection information in your override. Therefore, when you tell Akeeba Backup to back up the site's database it backs up the database you specified in the override. While it was originally created to handle the use case of a database cluster (different database host for writing to the database than reading from the database) it works great for your use case, too!

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!

stavrosz

Thank you Nicholas. Your solution works.

The "Site overrides" section was always bypassing my attention. Besides, the wording of the option "Main site database only (SQL file)" somehow narrowed my focus.

 

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!