Support

Site Restoration

#16083 New Angie script doesn't handle change in DB prefix length

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 Wednesday, 15 May 2013 11:29 CDT

tabletguy
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yup
Have I searched the tickets before posting? A while back I did, but not today.
Have I read the documentation before posting (which pages?)? Ditto
Joomla! version: (unknown) 2.5.11 now, but was 2.5.9 when I had the issue
PHP version: (unknown)
MySQL version: (unknown)
Host: (optional, but it helps us help you) CPanel
Akeeba Backup version which took the backup: (unknown) Previous version
Kickstart version used to extract the backup: (unknown) Current as of 3-4 weeks ago.

Description of my issue:

I haven't been able to log on and submit tickets, because this site has been unavailable during any times that I could get to it (evening Central US time).

I had this problem a while back, so I'm just reporting it in a general sense. I was able to use phpMyAdmin to fix my own problem at the time. Sorry for the level of vagueness.

I did a vanilla install on Cpanel, to set up a database, password, user, etc. The intention was to overwrite this with a restore from my WAMP server. I've done this dozens of times in the past few years.

The vanilla CPanel install of Joomla 2.5.9 had a 4 character prefix (Ex: abcd_)

My new install had a 5 character prefix Ex: "vwxyz_" in the backup. The 5 char prefix was in the "drop these tables" section, but I changed it to the 4 character prefix. After running, the database still had the 4 character prefix tables PLUS some new 5 character prefix tables. The configuration.php also had the 4 char prefix (if I recall correctly).

My restore obviously had additional tables (due to extra components, etc). That's why the resulting database had a mix of 4 and 5 character prefixes.

If I need to recreate this scenario for you, please let me know.

nicholas
Akeeba Staff
Manager
The restored tables will only get the prefix that you specify during the restoration. Let me be more specific.

The tables are stored in the SQL dump files like this: #__users (the #__ is the "meta-prefix", replaced with the real prefix during restoration – this is standard Joomla! practice). Let's say that you choose to use the prefix abcd_. This will result in the #__users table being read and parsed as abcd_users. If the table abcd_users exists in your database it will be dropped. Then it will be restored from the SQL dump.

The only way to end up with tables of a different prefix is to have tables of that prefix already in your database OR having multiple prefixes in the database you are backing up from. At backup time only the tables with the prefix used by Joomla! will be rewritten with the #__ meta-prefix. All other table names will remain as-is and restored as-is.

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!

tabletguy
OK, I'll try and reproduce it so that I can give you specific details. I realize it's supposed to work the way you described.

It will be a couple of days before I can do that.

nicholas
Akeeba Staff
Manager
No problem! Thanks in advance :)

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!