Support

Akeeba Solo

#38213 SQL backup making duplicates for large file

Posted in ‘Akeeba Solo (standalone)’
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
7.4
Akeeba Solo version
7.6.4

Latest post by RakataTech on Friday, 23 December 2022 03:51 CST

RakataTech

Good morning,

 

 

I used Akeeba backup to restore a live site on a test environment.

I tried with just a SQL dump in first place and tried again with a full backup file, both times I had errors saying that there is duplicate records.

 

The SQL files were about 2GB, and after checking them it happen that someimtes near a new line of "Insert <Table name> ...." the records above and under this lines were duplicates.

 

I was just wondering if it was a known behaviour ? Or I failed something in the configuration allowing the duplicates in SQL backup files ?

 

 

 

Kind regards,

Max 

nicholas
Akeeba Staff
Manager

This is extremely rare and will only happen when backing up a large table which is changing while the backup is taking place AND the table does not have an outnumber primary key. In this case MySQL does not know where exactly to continue dumping records if a record was deleted within the dataset already dumped.

However, there is a solution to that when restoring a full site backup.

In the Database page look at the right hand column. Check the “Use REPLACE instead of INSERT” option. Documentation: https://www.akeeba.com/documentation/akeeba-backup-joomla/angie-installers.html#angie-common-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!

RakataTech

Hi Nicholas,

 

 

Thanks for the quick answer, make sense.

 

How do I handle it if I am doing a database only restoration ?

 

 

 

Kind regards,

Max

nicholas
Akeeba Staff
Manager

Open the SQL file and change all instances of uppercase INSERT INTO with uppercase REPLACE INTO. That's what the option I mentioned does in the full site restoration.

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!

RakataTech

Hi Nicholas,

 

 

Thanks for your answer, tried both full site and DB only both worked perfectly. Closing the ticket.

 

 

Kind regards,

Max

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!