Support

Site Restoration

#11904 SQL error when restoring

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 nicholas on Friday, 13 April 2012 02:38 CDT

user13457
Mandatory information about my setup:

Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.25
PHP version: 5.2.17
MySQL version: 5.1.61-community-log
Host: (optional, but it helps us help you)
Akeeba Backup version which took the backup: 3.0
Kickstart version used to extract the backup: 3.1.1


Description of my issue:

I get the following error when attemtping a restore. It gets to about 7% and then gives the error. I have tried multiple backups and all give the same error. Would appreciate any advice on this as I am desperate to get the site back up.

Error at the line 679: INSERT INTO `j17_virtuemart_states` VALUES ('532', '1', '84', '0', 'ΛΑΡΙΣΑΣ', 'ΛΑΡ', 'ΛΡ', '0', '0', '1', '0000-00-00 00:00:00', '0', '0000-00-00 00:00:00', '0', '0000-00-00 00:00:00', '0' ... MySQL: MySQL query failed with error 1062 (Duplicate entry '84-???' for key 'idx_state_3_code'). The query was:INSERT INTO `j17_virtuemart_states` VALUES ('532', '1', '84', '0', 'ΛΑΡΙΣΑΣ', 'ΛΑΡ', 'ΛΡ', '0', '0', '1', '0000-00-00 00:00:00', '0', '0000-00-00 00:00:00', '0', '0000-00-00 00:00:00', '0')

nicholas
Akeeba Staff
Manager
As documented, you have to set your database collation to utf8_general_ci before restoring your site. Again, as documented, if this is not possible, please check the "Force UTF8 collation" option in Akeeba Backup Installer before clicking on the "Next" button in the database restoration page.

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!

user13457
Thank you for the reply. I have checked my database and it is set to utf8_general_ci - I have done backups and restores 100s of times over (I have many sites across a number of servers) and I've never come across this error before and in fact I've never actually really had any errors until this one. Usually everything works perfectly as expected.

I could not see where the Force UTF8 collation option was in the restoration page. I checked the documentation and it says it should be in the fine tuning section in the restoration area but I do not seem to have it?

nicholas
Akeeba Staff
Manager
Hm, that option is there for over a year, but I now see that you say that you're using Akeeba Backup 3.0. The current version is 3.4.3 and we no longer support Akeeba Backup 3.0. Is it possible to use Akeeba Backup 3.4.3 to take a new backup? The restoration script in 3.4.3 is infinitely more stable than what we had two years ago in the 3.0.x releases. (The restoration script is included inside the backup archive; Kickstart merely extracts the archive, it doesn't restore your database)

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!

user13457
Oh, I see. No unfortuntely I am not able to make another backup. I need to restore this particular backup or at least one of the earlier ones which are all giving me the same error...

nicholas
Akeeba Staff
Manager
Hi Kristy,

In this case, the only way to restore your site is using the emergency manual restoration procedure, dropping the tables before restoring the content through phpMyAdmin.

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!