Support

Akeeba Backup for Joomla!

#42676 Multiple Database Definitions - connection credentials of additional databases remain those of the backup site resulting in backup failures on the restored site

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 and 8.5
Akeeba Backup version
10.2.2

Latest post by nicholas on Thursday, 29 January 2026 09:18 CST

stavrosz

I have a site using two databases (one for Joomla and an additional for a project). The additional database was declared in Akeeba Backup's "Multiple Database Definitions".

The site is setup on both a localhost machine and an online machine. The database connection credentials and database names are different on the two sites.

When I backup from one site and restore to the other, the restoration process asks the connection credentials of both databases (username, password, database name, even the tables' prefix).

In the restored site's Akeeba Backup "Multiple Database Definitions" section, the database credentials of the additional database are not updated, but remain those of the backed up site.

As a result backups on the restored site fail, until I manually update the "Multiple Database Definitions". This has to be done after every restoration from one machine to the other.

Can you please automate the updating of this section with the data provided during the restoration process? Or have I missed something (again)?

Thank you

Stavros Zacharias

nicholas
Akeeba Staff
Manager

 I am not sure what you are asking. I mean this honestly and literally.  There is a way to enter different connection information both in manual (browser) and automated (CLI) restoration. Based on your wording, I am unsure if you are talking about manual restoration through the browser, automatic restoration over CLI, or why the saved database connection information during the manual restoration is not cleared before being presented to you. Please let me reply to all these possible questions.

When you are restoring a backup you are asked to provide the database connection information for each database being restored. The name of the database being restored is shown to you. When you change the database connection information in the restoration page, that's what is used when the database is being restored.

For the main site database the connection information is blanked out in two cases. One, if you have selected not to save that information at backup time. Two, if you are restoring to a different domain, subdomain, or subdirectory – or, at least, if PHP can convey that information correctly to BRS. Note that this applies only to the main site database, not the add-on databases.

When you are doing an automated restoration via CLI you get separate sections for each of the databases as documented in https://www.akeeba.com/documentation/brs/cli-config.html#cli-config-format-database :

The first configured database is the site's main database, and its property name is always site. Every additional database's property name is in the format uniquePrefix-databaseName, e.g. 5118D1DD-example. You can find these names in the installation/sql/databases.json file.

If you meant something different, or need a clarification, please ask me.

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

I meant something different. My request to "automate the updating" might have contributed to the confusion. I was referring only to manual (browser) restoration, and the problem is only with the add-on databases. There is no problem with the Joomla main database.

Allow me to explain it step by step with mockup names.

I have a localhost site with an add-on database. The localhost add-on database is called db1 and its login credentials are User: user1, Password: AAABBB

I backup this localhost site and I restore it online. The online add-on database is called db2 and its login credentials are User: user2, Password: CCCDDD

When the online restoration ends successfully, I visit the online site's /administrator --> Components --> Akeeba Backup for Joomla --> Control Panel and I click the "Multiple Database Definitions" button. I click the "Edit" button and the "Edit" panel pops up. In that panel I expect to see the db2, the user2 and the CCCDDD. But, instead I see the db1, the user1 and the AAABBB, which are the credentials of the localhost and not of the online add-on database. Trying to make a backup of the restored online site fails, because the add-on database with the name db1 does not exist on the online server (nor the user1 and AAABBB).

This is what I meant that the credentials for the add-on databases must be updated from the information we provide during the restoration.

During restoration, I am asked to provide the db2, user2 and CCCDDD information for connection to the online server's add-on database. That information should additionally be used for updating the online server's Akeeba "Multiple Database Definitions".

nicholas
Akeeba Staff
Manager

Oooh! You mean how the database is defined in the backup profile on the restored site. No, this will never be updated automatically.

There are several practical considerations. To begin with, you may want this information to be updated in some, all, or none of the backup profiles which may or may not have been included in the backup.

Instead of trying to duplicate half of the Akeeba Backup user interface in the restoration script, there's an integration with the Joomla CLI application instead.

Let's say you are using profile 29. To list the database inclusions you'd do this:

$ php cli/joomla.php akeeba:filter:list --type=include --target=db --profile=29

List of Akeeba Backup filters matching your criteria
====================================================

 -------------------------------------- --------- ----------- -------- ------ ---------- ---------- ---------- -------- --------------------
  filter                                 type      host        driver   port   username   password   database   prefix   dumpFile
 -------------------------------------- --------- ----------- -------- ------ ---------- ---------- ---------- -------- --------------------
  C4368DC0-B7B8-40CD-BECA-00F5591BB086   multidb   localhost   mysqli          mydb       foobar     otherdb    bar_     C4368DC0-boot4.sql
 -------------------------------------- --------- ----------- -------- ------ ---------- ---------- ---------- -------- --------------------

You could delete that inclusion with 

$ php cli/joomla.php akeeba:filter:delete --profile=29 --filterType=multidb C4368DC0-B7B8-40CD-BECA-00F5591BB086

And you could define a new one like so:

$ php cli/joomla.php akeeba:filter:include-database --profile=29 --dbdriver=pdomysql \
--dbusername=mydbuser --dbpassword=mynewdbpassword --dbname=myotherdb --dbprefix='foo_' --check

You could combine that with an automated restoration under the CLI if you are doing that regularly to fully automate the process.

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!