Support

Akeeba Backup for Joomla!

#8944 Having issues with restoring website back-up

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
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Friday, 22 July 2011 16:36 CDT

user42577
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)Yes
Have I searched the forum before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.22
PHP version: 5.3.6
MySQL version: Don't know
Host: Just Host
Akeeba Backup version: 3.3.a3

EXTREMELY IMPORTANT: Please attach your Akeeba Backup log file in order for us to help you with any backup or restoration issue.

Description of my issue:
I am trying to restore a back up version of our website to my Just Host hosting account. I uploaded the files via ftp using binary mode. I read the akeeba instructions - pressed escape and followed the prompts - however, when I get to the screen and it asks me to view the front page of site & back-end, when I click to go to either, I am returned the following error message:
Database Error: Unable to connect to the database:Could not connect to MySQL - and my site doens't show up at all.

I don't understand why this is happening, can you please help me to get me site's back-up fully restored?

Thanks,

nicholas
Akeeba Staff
Manager
Hi!

It seems that the configuration.php file wasn't written to disk during the last step of Akeeba Backup Installer's restoration procedure, causing this issue.

The easiest workaround is to repeat the restoration process. Go through the usual restoration process and take a look at the last page of Akeeba Backup Installer. If it tells you that the configuration.php file wasn't written to disk, it presents you a gray text area with the contents of the configuration.php that it was unable to write. In this case, download your configuration.php file, edit it with a plain text editor (depending on your Operating System, good candidates include Notepad, GEdit, Fraise) and replace its contents with the contents of the gray box. Then, upload the configuration.php file back to your site's root, go back to Kickstart and click on Clean Up.

If that didn't work, you will have to do some manual editing. Edit your site's configuration.php file. Your configuration.php consists of several lines. Each one is in the following form:
var $key = "value";

The key is the name of the configuration variable and value (inside double quotes!) is the value of the variable. Below is a list of the configuration variables which have to be modified to get up on-line:

dbtype is the database driver Joomla! will use. It can be either mysql or mysqli (notice the extra i in the end). If unsure, your best bet is mysql.

host is the database host name, usually localhost. If that doesn't work, try 127.0.0.1. If that still doesn't work, ask your host.

user is the database user name, assigned from your host company

password is - obviously - the database password, assigned from your host company

db is the database's name, assigned from your host company

dbprefix is the database table name prefix; on most Joomla! 1.5/1.6 sites it is jos_. You can find it out by looking at your database using phpMyAdmin and seeing what is the common part all table names begin with. Important: bak_ are backup copies of your table and should NEVER be used as your site's prefix.

live_site (this is an optional setting) Normally this is an empty string. If, however, your Joomla! site's front page looks as if all images and CSS files are not loading, you have to modify it and enter your site's base URL. For example, if the new site is located in http://www.example.com/mysite/, you have to locate the line starting with var $live_site and change it to become:
var $live_site = "http://www.example.com/mysite";
Important: Do NOT include the trailing slash.

That's all! You're good to go.

If you get stuck, please do not hesitate to post back so that I can further assist 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!

user42577
Hi,

Thank you very much for your reply. I am going to try that right now. However, I have one last question and I'm not sure if this makes any difference or not? Please see how I have the software configured in this screenshot: http://screencast.com/t/LBxGuocKPU

Does it make a difference that there is data excluded from the back-up? Does this prevent the database and configuration.php file from being taken with the site back-ups?

This may be stupid question. However, I don't really know. The site uses many different components and therefore, has a lot of information in the database. Should I reconfigure these settings?

If so, what do you recommend?

Thanks,

nicholas
Akeeba Staff
Manager
Hi!

The default configuration (when you install the Akeeba Backup component) is to not exclude such crucial files and information from your site. Unless you intentionally used the "Files and Directories Exclusion" and "Database Tables Exclusion" to exclude information from your site, nothing was excluded except the contents of your temporary, log and cache folders, i.e. the folders which contain temporary information that doesn't make any sense to backup in the first place.

That said, your issue does not seem to have anything to do with excluded data. The restoration script (Akeeba Backup Installer) which is automatically included in every Akeeba Backup archive is able to cope with missing configuration.php files. In fact, it generates a brand new configuration.php file at the end of the restoration process and attempts to write it to your site's root, overwriting any existing file under the same name. There are three known issues with that:
1. Some older versions of Akeeba Backup Installer, shipped with early versions of Akeeba Backup in the 3.1.x range, had a bug which prevented some of the information to be updated in the configuration.php file. This doesn't seem to be the case here, as you have a more recent version. Side note: please upgrade to 3.3.1 stable, released today.
2. If you take too long to proceed to the final two pages, your PHP session might expire and the database information is "forgotten" by the script. Unfortunately, there is no way to throw an error in this case. The end result is that the database connection information written in the configuration.php file is blank, resulting in an error when trying to access the site. If you suspect that this is the case, please do not wait more than 5 minutes after the database restoration is over until you proceed to the next page or proceeding from the site setup to the final page of the restoration script.
3. If the configuration.php file is not writable, Akeeba Backup Installer warns you that it can not write to the file and displays the proposed content of the file in its final page. It also displays a prominent modal dialog to let you know of this fact. It is then your responsibility to manually edit that file in order to update it with the contents displayed in Akeeba Backup Installer's interface, as I said in my previous post.

I hope that makes sense. If you get stuck somewhere, feel free to post back!

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!