Support

Akeeba Backup for Joomla!

#33595 Problem with database restore in migration

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 on Sunday, 27 September 2020 01:17 CDT

bsimoes

Hi,

When i try the migration of site and restoration in a new server i get the following error during database restoration. Can't further more. I tryed new backups and several restorations.

Can you help?

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.
Database error processing line 55
Database server error reply:

ErrNo #1061
Duplicate key name 'cgn01_admintools_log_logdate_reason'
SQL=CREATE TABLE `cgn01_admintools_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`logdate` datetime NOT NULL,
`ip` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(10240) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`reason` enum('other','adminpw','ipwl','ipbl','sqlishield','antispam','wafblacklist','tpone','tmpl','template','muashield','csrfshield','badbehaviour','geoblocking','rfishield','dfishield','uploadshield','xssshield','httpbl','loginfailure','securitycode','external','awayschedule','admindir','sessionshield','nonewadmins','nonewfrontendadmins','configmonitor','phpshield','404shield') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`extradata` longtext COLLATE utf8mb4_unicode_ci,
UNIQUE KEY `id` (`id`),
KEY `cgn01_admintools_log_logdate_reason` (`logdate`,`reason`),
KEY `cgn01_admintools_log_logdate_reason` (`logdate`,`reason`)
) ENGINE=MyISAM AUTO_INCREMENT=20236 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
Raw query text:

CREATE TABLE `cgn01_admintools_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`logdate` datetime NOT NULL,
`ip` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`url` varchar(10240) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`reason` enum('other','adminpw','ipwl','ipbl','sqlishield','antispam','wafblacklist','tpone','tmpl','template','muashield','csrfshield','badbehaviour','geoblocking','rfishield','dfishield','uploadshield','xssshield','httpbl','loginfailure','securitycode','external','awayschedule','admindir','sessionshield','nonewadmins','nonewfrontendadmins','configmonitor','phpshield','404shield') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`extradata` longtext COLLATE utf8mb4_unicode_ci,
UNIQUE KEY `id` (`id`),
KEY `cgn01_admintools_log_logdate_reason` (`logdate`,`reason`),
KEY `cgn01_admintools_log_logdate_reason` (`logdate`,`reason`)
) ENGINE=MyISAM AUTO_INCREMENT=20236 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

tampe125
Akeeba Staff

Hello,

you can tell ANGIE to ignore SQL errors by removing both checks from the options Stop on ... errors .

At the end you will have a SQL file containing all the failed query, so you can manually edit them and rerun them.

 

In your case the line KEY `cgn01_admintools_log_logdate_reason` (`logdate`,`reason`), is repeated: simply delete it and then run the SQL query in your database administration tool (such as phpMyAdmin). That will do the trick.

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!

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!