Support

Site Restoration

#41288 cannott restore my site to an earlier version from backup

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.0
CMS Type
Joomla!
CMS Version
5.2.0
Backup Tool Version
n/a
Kickstart version
kickstart-pro-8.0.6

Latest post by nicholas on Tuesday, 05 November 2024 11:23 CST

schabert

hello,

I am trying to restore to a earlier version of my site from a backup, but I gett the error msg : 


"Akeeba Backup Site Restoration Script v.9.9.9
 Previous
 Skip Restoration
 Next
No idea what you are supposed to do? Don't panic!  Read the documentation page
Pre-installation  Database Restoration  Site Setup  Finished
 Show / hide help
Restoration of site's main database
Connection information
Database type

Database server host name

User name

Password

Database name

Database table name prefix

Uncommon Options
The following options are used in less common and exotic MySQL configurations.
 Use SSL/TLS
SSL Ciphers

SSL Certificate file

SSL Key file

SSL CA file

 Verify Server Certificate
Advanced options
With existing tables

 Suppress foreign key checks
 No auto value on zero
 Use REPLACE instead of INSERT
 Force UTF-8 collation on database
 Force UTF-8 collation on tables
 Allow UTF8MB4 auto-detection
 Stop on CREATE error
 Stop on other error
Fine tuning

Do not change these settings unless you are requested to do so by our support or you REALLY know what you are doing.
Maximum execution time

Throttle time (msec)

Copyright ©2006 – 2024 Akeeba Ltd. All rights reserved.
ANGIE is Free Software distributed under the GNU GPL version 3 or any later version published by the FSF.
Database restoration
An error occurred while restoring the database. The error message can be found below. Click on the × button at the top right of this dialog message to close it and return to the database restoration page.
Wrong database connection information

We were unable to connect to your database server using the server host name, username and password you provided.

The error received was:

Cannot connect to the database: one or more of the database host name, user name and password you have provided is incorrect.

Unable to connect to the Database: MySQL server has gone away

How to fix this error
Show / Hide

Debug information
Show / Hide

Please include this information in your support request if you need further assistance. Do tell us which troubleshooting steps you've already tried.

Cannot connect to the database: one or more of the database host name, user name and password you have provided is incorrect.

/Users/serge/Sites/belgard/installation/framework/database/restore/mysqli.php:84

#0 /Users/serge/Sites/belgard/installation/framework/database/restore/mysqli.php(46): ADatabaseRestoreMysqli->getDatabase()
#1 /Users/serge/Sites/belgard/installation/framework/database/restore.php(309): ADatabaseRestoreMysqli->__construct('site.sql', Array, Object(AContainer))
#2 /Users/serge/Sites/belgard/installation/angie/controllers/dbrestore.php(57): ADatabaseRestore::getInstance('site.sql', Array, Object(AContainer))
#3 /Users/serge/Sites/belgard/installation/framework/controller/controller.php(511): AngieControllerDbrestore->start()
#4 /Users/serge/Sites/belgard/installation/framework/dispatcher/dispatcher.php(264): AController->execute('start')
#5 /Users/serge/Sites/belgard/installation/framework/application/application.php(177): ADispatcher->dispatch()
#6 /Users/serge/Sites/belgard/installation/index.php(130): AApplication->dispatch()
#7 /Users/serge/Sites/belgard/installation/index.php(249): mainLoop()
#8 {main}
Unable to connect to the Database: MySQL server has gone away

/Users/serge/Sites/belgard/installation/framework/database/restore.php:865

#0 /Users/serge/Sites/belgard/installation/framework/database/restore/mysqli.php(75): ADatabaseRestore->getDatabase(false)
#1 /Users/serge/Sites/belgard/installation/framework/database/restore/mysqli.php(46): ADatabaseRestoreMysqli->getDatabase()
#2 /Users/serge/Sites/belgard/installation/framework/database/restore.php(309): ADatabaseRestoreMysqli->__construct('site.sql', Array, Object(AContainer))
#3 /Users/serge/Sites/belgard/installation/angie/controllers/dbrestore.php(57): ADatabaseRestore::getInstance('site.sql', Array, Object(AContainer))
#4 /Users/serge/Sites/belgard/installation/framework/controller/controller.php(511): AngieControllerDbrestore->start()
#5 /Users/serge/Sites/belgard/installation/framework/dispatcher/dispatcher.php(264): AController->execute('start')
#6 /Users/serge/Sites/belgard/installation/framework/application/application.php(177): ADispatcher->dispatch()
#7 /Users/serge/Sites/belgard/installation/index.php(130): AApplication->dispatch()
#8 /Users/serge/Sites/belgard/installation/index.php(249): mainLoop()
#9 {main}"

can youu please help as I am at my wits end.

schabert

my database link

nicholas
Akeeba Staff
Manager

Please read this troubleshooting page in our documentation: https://www.akeeba.com/documentation/akeeba-backup-joomla/abidatabase.html 

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!

schabert

hello,

 

I read the documemt. I was able to create the database in mamp/phpmyadmin

I ran the kickstart.php.

the backup was restored I closed tthe window and went back to the page "

Restoration and Clean Up"

I clicked on visit your site's frontend button, and then, I get this error message:

 

Could not connect to PDO: SQLSTATE[HY000] [2002] No such file or directory   Joomla\Database\Exception\ConnectionFailureException  in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php (line 334) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php -> connect (line 182) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/DatabaseDriver.php -> connect (line 1745) DatabaseDriver->setQuery(object(MysqlQuery))in /Users/serge/Sites/belvillejoom/libraries/src/Menu/SiteMenu.php (line 166)
  1. )
  2. ->bind(':currentDate2', $currentDate)
  3. ->order($this->db->quoteName('m.lft'));
  4. $items = [];
  5. $iterator = $this->db->setQuery($query)->getIterator();
  6. foreach ($iterator as $item) {
  7. $items[$item->id] = new MenuItem((array) $item);
  8. }
SiteMenu->Joomla\CMS\Menu\{closure}()in /Users/serge/Sites/belvillejoom/libraries/src/Cache/Controller/CallbackController.php (line 51) CallbackController->get(object(Closure), array(), 'd17e8e13b99b4d9bf23a7d0b83a466c3', false)in /Users/serge/Sites/belvillejoom/libraries/src/Menu/SiteMenu.php (line 179) SiteMenu->load()in /Users/serge/Sites/belvillejoom/libraries/src/Menu/AbstractMenu.php (line 333) AbstractMenu->getMenu()in /Users/serge/Sites/belvillejoom/libraries/src/Menu/AbstractMenu.php (line 164) AbstractMenu->getItem(null)in /Users/serge/Sites/belvillejoom/libraries/src/Application/SiteApplication.php (line 434) SiteApplication->getTemplate(true)in /Users/serge/Sites/belvillejoom/libraries/src/Error/Renderer/HtmlRenderer.php (line 50) HtmlRenderer->render(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Exception/ExceptionHandler.php (line 136) ExceptionHandler::render(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Exception/ExceptionHandler.php (line 73) ExceptionHandler::handleException(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Application/CMSApplication.php (line 336) CMSApplication->execute()in /Users/serge/Sites/belvillejoom/includes/app.php (line 58) require_once('/Users/serge/Sites/belvillejoom/includes/app.php')in /Users/serge/Sites/belvillejoom/index.php (line 32) PDOException 

SQLSTATE[HY000] [2002] No such file or directory

in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php (line 327) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php -> __construct (line 327) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php -> connect (line 182) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/DatabaseDriver.php -> connect (line 1745) DatabaseDriver->setQuery(object(MysqlQuery))in /Users/serge/Sites/belvillejoom/libraries/src/Menu/SiteMenu.php (line 166)
  1. )
  2. ->bind(':currentDate2', $currentDate)
  3. ->order($this->db->quoteName('m.lft'));
  4. $items = [];
  5. $iterator = $this->db->setQuery($query)->getIterator();
  6. foreach ($iterator as $item) {
  7. $items[$item->id] = new MenuItem((array) $item);
  8. }
SiteMenu->Joomla\CMS\Menu\{closure}()in /Users/serge/Sites/belvillejoom/libraries/src/Cache/Controller/CallbackController.php (line 51) CallbackController->get(object(Closure), array(), 'd17e8e13b99b4d9bf23a7d0b83a466c3', false)in /Users/serge/Sites/belvillejoom/libraries/src/Menu/SiteMenu.php (line 179) SiteMenu->load()in /Users/serge/Sites/belvillejoom/libraries/src/Menu/AbstractMenu.php (line 333) AbstractMenu->getMenu()in /Users/serge/Sites/belvillejoom/libraries/src/Menu/AbstractMenu.php (line 164) AbstractMenu->getItem(null)in /Users/serge/Sites/belvillejoom/libraries/src/Application/SiteApplication.php (line 434) SiteApplication->getTemplate(true)in /Users/serge/Sites/belvillejoom/libraries/src/Error/Renderer/HtmlRenderer.php (line 50) HtmlRenderer->render(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Exception/ExceptionHandler.php (line 136) ExceptionHandler::render(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Exception/ExceptionHandler.php (line 73) ExceptionHandler::handleException(object(ConnectionFailureException))in /Users/serge/Sites/belvillejoom/libraries/src/Application/CMSApplication.php (line 336) CMSApplication->execute()in /Users/serge/Sites/belvillejoom/includes/app.php (line 58) require_once('/Users/serge/Sites/belvillejoom/includes/app.php')in /Users/serge/Sites/belvillejoom/index.php (line 32) Joomla\Database\Exception\ConnectionFailureException 

Could not connect to PDO: SQLSTATE[HY000] [2002] No such file or directory

in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Pdo/PdoDriver.php (line 334) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/database/src/Mysql/MysqlDriver.php -> connect (line 196) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php -> connect (line 223) DatabaseHandler->open('/Applications/MAMP/tmp/php', 'e727f9fcc4b10f0053d7ed18bd832731') in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/session/src/Storage/NativeStorage.php session_start (line 459) NativeStorage->start()in /Users/serge/Sites/belvillejoom/libraries/src/Session/Storage/JoomlaStorage.php (line 313) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/session/src/Session.php -> start (line 396) in /Users/serge/Sites/belvillejoom/libraries/vendor/joomla/session/src/Session.php -> start (line 327) Session->has('user')in /Users/serge/Sites/belvillejoom/libraries/src/Session/Session.php (line 194) Session->get('user')in /Users/serge/Sites/belvillejoom/libraries/src/Factory.php (line 372) Factory::getUser()in /Users/serge/Sites/belvillejoom/libraries/src/Application/SiteApplication.php (line 570) SiteApplication->initialiseApp()in /Users/serge/Sites/belvillejoom/libraries/src/Application/SiteApplication.php (line 238) SiteApplication->doExecute()in /Users/serge/Sites/belvillejoom/libraries/src/Application/CMSApplication.php (line 306) CMSApplication->execute()in /Users/serge/Sites/belvillejoom/includes/app.php (line 58) require_once('/Users/serge/Sites/belvillejoom/includes/app.php')in /Users/serge/Sites/belvillejoom/index.php (line 32) PDOException 

SQLSTATE[HY000] [2002] No such file or directory

schabert

This is ridiculous, I followed all the instructions to the letter. I tried several times. but I still get that message page after clicking "visit your site's frontend" button.

Somebody help me please!!!!

 

nicholas
Akeeba Staff
Manager

Are you sure the configuration.php file has been updated? It is possible that at the end of the restoration you were told to take manual action to replace its contents. I am asking because the “PDOException SQLSTATE[HY000] [2002] No such file or directory” error means that the database hostname is wrong, but you said that you already restored the database.

Regarding Kickstart, please remember that it's an archive extraction script, it IS NOT a site restoration script. Kindly read the fine manual, or next time you run Kickstart don't just close the dialog at the start where it explains this point. The "Visit the site's frontend" button appears as soon as you click the "Run the Installer" button, long before the actual restoration script gets a chance to run.

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!

schabert

Tthis is a video that shows  the process I followed from start to finish

 

 

schabert

Tthis is a video that shows  the process I followed from start to finish

schabert

I could no tupload the video so here is the link for it:

https://www.dropbox.com/scl/fi/2a6kushf6tqchke96adtv/backup_resttore_issue.mp4?rlkey=wt2w2qjgqt2amedpb6pk64uu2&dl=0

nicholas
Akeeba Staff
Manager

Your database server hostname cannot possibly be http://localhost:8888/phpMyAdmin5/index.php. That's the HTTP URL to access phpMyAdmin.

Try using localhost in that field.

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!

schabert

Welll I tried localhost, and even 127.0.0.1 and i get msg that it cannot connect to database. The only thing that works is what I put in the video.

schabert

ok, after extensive trial and error, I finally succeeded with the info shown in the screenshot

This is far from being straightforward  because you have to actually:

  1. enter localhost,
  2. then the username and password to access phpmyadmin instead of the actual password of the specific database,
  3.  then the database name,
  4. and choose "mysql pdo driver" because with "mysqli(prefered)" it does not work.

as shown in the screenshot.

 

nicholas
Akeeba Staff
Manager

You are wrong in many accounts.

First of all, the username and password you need to enter is that of your database user. Kindly note that phpMyAdmin itself does not have its own users; you enter the username and password of a database user. By default, you enter the username root and the root user's password. The root user is a special user which has full access to all databases on the server. That's why it "magically" works no matter what.

Merely having set up a database user and a database IS NOT ENOUGH. That is NOT how the MySQL server works. You need to explicitly tell MySQL which databases the database user will have access to, and what privileges it will have on those databases. This is soemthing you can very easily do in phpMyAdmin's Users tab. Again, this is how the database server works. It has nothing to do with our software.

Kindly note that in the documentation I linked you to you are told that you need to have performed these steps prior to restoring the database. Quite simply put, if you have not set up your database and database user correctly, and/or not have the correct database connection information (hostname, username, password, database name) prior to the restoration you will not be able to restore the database. This is NOT related to our software; you would also be unable to set up a new WordPress site without these steps having taken place and this information being available. PHP needs to know how to connect to your database, and it's your responsibility to provide this information. It cannot possibly be auto-detected.

Regarding which database driver you should use, it depends entirely on your web server configuration. Item 2 in the documentation page I gave you does tell you that you should try switching between the different database driver options if you find that one doesn't work. The two options available on PHP versions released this past decade (i.e. PHP 7.0 or newer) are mysqli and PDO MySQL. mysqli is the "classic" database driver for PHP which binds directly to libmysql, the low level driver for MySQL connection. The PDO MySQL driver is a newer, more modern driver based on PHP's PHP Data Objects (PDO) library. They are two separate PHP extensions. Some servers have only one of the two enabled (in which case you only get one of the two options), or both. Because they use very different methods for "talking" to the database, it is possible that only one of them works on your specific server environment.

Finally, kindly note that we were contacted by Paddle about the email you sent them yesterday at around 23:30 EET claiming that we are not replying to you. I would like to remind you that our working hours are Monday to Friday 9am to 7pm EET (7am to 5pm in your timezone). Sending us replies outside our working hours does not guarantee a reply, especially when your replies come after 10pm our time, or over the weekend. Kindly note that as per our Terms of Service we only provide support within our working hours. Thank 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!

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!