Support

Site Restoration

#32214 Why do some restores erase the configuration data?

Posted in ‘Site restoration’
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

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by on Wednesday, 05 February 2020 17:17 CST

maestroc
I run into this problem occasionally when restoring sites and have not noticed a specific unifying factor for it.

Occasionally when I have to restore a site from the back end by clicking restore the kickstart installer seems to wipe out the database connection info and makes me reenter it. Other times that data is remembered properly and apparently pulled from the existing configuration.php file. Is there something that I need to do ahead of time to make sure that all backups preserve the db connection info inside the jpa file so that I don't have to run around finding cpanel or database credentials to set it up again in the middle of a restore?

nicholas
Akeeba Staff
Manager
OK, the title of the ticket is misleading. We are NOT wiping out the configuration of your site, ever. Your question is why the database connection information in the database restoration page is sometimes filled in and sometimes not. That's very different than wiping out the configuration of your site.

The database connection information for your site is typically saved in your backup unless you have explicitly said otherwise in Akeeba Backup's Configuration. So, first thing to do is check that. For all backup profiles go to their Configuration page. Find the “Database backup engine” row. Click on “Configure...” next to it. Find the “Blank out username / password” checkbox. Make sure it is NOT checked. This ensures that the information is present in the backup.

The next thing to consider is the hostname you backed up from and the hostname you are restoring to. Do remember that example.com and www.example.com are two different hostnames. If you have taken the backup on example.com but you are restoring it on www.example.com (or vice versa) the restoration script considers it a restoration to a different site and will blank out the database connection information. This is on purpose. The population of users restoring a site to a different server without realizing they need to provide different db connection information is three orders of magnitude higher than the population of users backing up in www and restoring in non-www (or vice versa) which is, in turn, an order of magnitude higher than the population of users accessing their sites from two or more entirely different domains.

The most likely cause of your problem is your configuration.php file. If you've set a $live_site there you might want to set it back to empty. It's not necessary for the overwhelming majority of Joomla installations. If that's not the case, set a redirection from the non-www hostname to the www hostname (e.g. example.com to www.example.com) to normalize the way you and your visitors access to site. As a corollary you will now always be backing up and restoring your site from the hostname that includes www, meaning that your db connection information will be pre-populated for you.

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!