Support

Site Restoration

#40340 Adding new database info, but old database is used

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
8.2
CMS Type
Joomla!
CMS Version
5.0.3
Backup Tool Version
9.8.5
Kickstart version
8.0.4

Latest post by tampe125 on Tuesday, 27 February 2024 09:50 CST

aschuch

I created a fresh database and set up the kickstart file under a new domain (same host, just another domain), transfered the backup file to the directory of the new domain.

Started restoration and added the credentials of the new database into the script during the process.

 

After finishing the restoration of the website, I checked the backend - it shows the database credentials of the old database.

 

Also I had to re-enter some basic infos like website name, etc. I remember from previous restorations that this was not necessary.

The configuration file of the restored site -which shows credentials of old database - has 644 permission (also all other files)

 

I checked the new database - it was filled with data during the restoration.

Adding the new database credentials in the Joomla backend of the restored site was not a good idea, as the restored site is then not working at all.

 

I was repeating the restoration now 2 times, carefully looking, if I have missed something, but nothing I could identify to be set wrong. Also made a fresh backup and used that one.

 

As a site note: I am also using Admin Tools. So on the restored site, I re-created the .htaccess file (but I dont think this is relevant at all).

 

What am I missing? Thank you.

nicholas
Akeeba Staff
Manager

Do the restoration once more. I believe that after you click the (final) Next button in the Site Setup page, the next page tells you that the configuration.php file is not writeable, giving you the contents to paste into it. Since that's the final page, it's possible that you may have closed it out of habit.

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!

aschuch

I did restore again, but same result. 

Something else, I have recognized:
On restore page "Restoration of site's main database" I am recognizing that the old database credentials are prefilled. As far as I recall this was usually not the case?
I changed data with new credentials, did not change anything under "Advanced options"

After changing to new credentials, and clicking in popup on Next, on next page again it shows generic info ("Your Joomla! Site" for site name, etc.

After finalisation: Checked the configuration.php on server - it has a new time stamp, but database credentials still the old ones. Although I am 100% sure I added new credentials during restoration.

 

nicholas
Akeeba Staff
Manager

As far as I recall this was usually not the case?

It has been the case since October 15th, 2006 when the first version of JoomlaPack, Akeeba Backup's predecessor, was written.

it has a new time stamp, but database credentials still the old ones. Although I am 100% sure I added new credentials during restoration.

When you say "new timestamp", do you mean the time it was extracted from the backup archive, or the time you finished the restoration? There is a huge difference between the two.

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!

aschuch

When you say "new timestamp", do you mean the time it was extracted from the backup archive, or the time you finished the restoration? There is a huge difference between the two.

 

-> Got you. I think it is the time, when it was extracted from the archive.

nicholas
Akeeba Staff
Manager

Okay, this means that the configuration.php file was not updated. But why?

Let's try an experiment. After extracting the backup archive and before clicking on Start the Restoration set the permissions of the configuration.php file to 0777. Does that work?

And no, I don't want you to start doing that by default, I am trying to narrow something down to see if there's a reason to go looking for something in the code, or if my hunch would take me in a wild goose chase.

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!

aschuch

Unfortunately same result.

 

Something else, which came to my attention:

The config file doesnt show the timestamp, when the backup file was extracted (some minutes ago).

Instead, it shows the timestamp of when I made the backup (today morning).

I did this fresh backup today morning after I have experienced the issue, when I was starting the first time making a restoration by using the backup from yesterday.

nicholas
Akeeba Staff
Manager

Are you using Kickstart's Hybrid or FTP mode when extracting your backup archive?

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!

aschuch

Not sure. I am manually uploading the jpa and the kickstart.php via FTP, then opening the page...

So I guess it is FTP-mode?

nicholas
Akeeba Staff
Manager

Do you enter FTP information in Kickstart itself?

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!

aschuch

No, I am using FTP only for transferring the files to the server manually. Then starting kickstart.php.

nicholas
Akeeba Staff
Manager

I have tried the restoration on a number of servers, without being able to reproduce this issue.

Based on the information you have provided it's not an issue with ownership or permissions of the configuration.php file. However, this leaves us with a big mystery, because the software definitely calls PHP's file_put_contents to replace the contents of the file, PHP returns true (which means it believes it has indeed saved the file correctly, or at least that's what the Operating System claims), and yet the file is not written.

The only thing I can possibly imagine is that something may be wrong with this particular server.

So, after changing the values in the configuration.php file manually you log into the site's administrator. Go to Global Configuration and change something, e.g. the site's name. Click on Save & Close. Does that change appear in the configuration.php file?

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!

aschuch

Thanks for looking into this issue. After restoration, I opened the admin, changes something in the Global Configuration (site name) and checked the configuration.php on the server: The changed site name shows up there.

 

"So, after changing the values in the configuration.php file manually you log into the site's administrator."

--> Not sure what you mean. I made the restoration, added the credentials during the process and finished it. I assume, you mean that?

aschuch

As I cannot edit my previous msg anymore, a new msg: Something I have not mentioned yet: And for the restored installation, I am constantly getting notifications (I guess from Admintools) that the file "configuration.php was modified". 

 

Just checked on filezilla: The file still has the timestamp from half an hour ago. Since then, I got about 5 notifications. 

 

(Over the weekend, I have deactivated the domain with the restored installation, now this comes back again after activation).

tampe125
Akeeba Staff

Hello,

I'm taking this ticket since Nicholas is currently unavailable.

Usually this happens when there's a malware scanner that is opening the files, checking for contents and then adjusts the last access time/modified time. This is why you're getting the message even if there are no visible changes.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

aschuch

Hi Davide,

thanks - I havent installed any extra malware scanner. Probably that comes from Admintools?

BR, Alexander

tampe125
Akeeba Staff

No, this is something that hosts usually install directly on their servers. It's not an extension that you can install on your website.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
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!