Support

Site Restoration

#20046 Unable to restore database divide by zero error

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 Monday, 12 May 2014 09:56 CDT

user58195
Attempting to restore my site using backup and kickstarte4. Receive error upon restoration of database step:

JSON Parse error: Unrecognized token '<'


Warning: Division by zero in /home/XXXXXX/XXXXXXXXX/restore/installation/framework/database/restore.php on line 703

{"percent":0,"restored":"0 b","total":"0 b","queries_restored":0,"current_line":0,"current_part":0,"total_parts":"1","eta":"2 minutes","error":"","done":"1"}

Established new database for restore. Error occurs almost immediately after attempting to restore database.

nicholas
Akeeba Staff
Manager
You have added an extra database definition in your backup for a database which contains no tables (or for which you have filtered out all tables). This is not supported as it doesn't make any sense backing a void database. Please go back to Akeeba Backup and remove the faulty external database definition.

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!

user58195
Nicholas,

Thanks for your help. I checked, and I haven't added any database definitions or off-site directories. In fact, the profile that I am using for back-ups derived from the configuration wizard. I am excluding !/^#__/!/ in my RegEx Database settings because Akeeba was hanging on backups. Do you think exclusions could be the problem rather than additional database definitions? If not, I could use some more direction if you are willing.

Fortunately, I figured out there was a problem by testing my backup. Its not an emergency, but I'd like to rectify the problem going forward.

nicholas
Akeeba Staff
Manager
The regex you are using is broken, therefore no tables are backed up. The correct regex is:
!/^#__/

This RegEx means do not backup anything that does not (!) match the regex (/): table name begins with (^) the database table prefix (#__); end of regex (/). Therefore it only backs up tables which start with the prefix of the site you are backing up.

Your RegEx (!/^#__/!/) means do not backup anything that does not (!) match the regex (/): table name begins with (^) the database table prefix (#__) followed by slash and exclamation mark (/!); end of regex (/). Since no table starts with #__/! (it can't; the slash is not a valid table name character) nothing is being backed up. This results in an empty db backup. Since this is the main db we can't possibly allow that and you get a nice error when restoring.

I hope that helps you better understand what happened!

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!