Support

UNiTE, Remote CLI, eXtract Wizard

#3648 akeeba extract and sql dump

Posted in ‘UNiTE and Remote CLI’
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
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Wednesday, 04 August 2010 12:21 CDT

user6048
Great component!

Newbie question: If I'm using the Akeeba extract, and I would like to get at the the sql db, where is it within the extraction? How does it work in a nutshell? Akeeba does a sql dump to a file, copies all site files and dump, then archives them all together?

Thanks.

dlb
The database dump is /installation/sql/joomla.sql. In the most recent versions, depending on the settings, there could be multiple s01, s02, etc. files that are part of the dump. In a full site backup, the table prefixes are replaced with "#_". The table prefixes are intact in a database only dump. Note that if you're using Community Builder, you can't just search and replace to restore the table prefixes, CB has the "#_" tag in it's data files. Use the procedure in the documentation under manual restore.

First the installer is added to the archive, then the database dump, then the files. That's the short version. :)


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user6048
You "work" on Sundays? I swear you guys are the best. :)

I do have Community Builder on one of my sites. That's good to know. Did you mean that you can't search and replace #_ in data files or that you can't search and replace #_ in the db?

I'm asking this question because the extraction is a handy thing to have when you just need a file or two or maybe a table from the db or an entire db (but don't need to restore the entire site). I'm assuming I can import the /installation/sql/joomla.sql to a local non production version of my site and then just export whatever table it was that I needed. Is it as simple as that?

Thanks again.

dlb
In a full site backup, Akeeba abstracts the table prefixes with "#_". CB has already done this with certain records in it's data files. You have to search and replace Akeeba's changes without affecting CB's data. That requires search for "CREATE TABLE `#_ (and so on)" and "INSERT INTO `#_ (and so on)" instead of just search for "akb_", which finds the data record too. CB is the only component that I know of that you have to watch out for, but the abstraction is "The Joomla! Way" so others could pick up on it.

I've already told you all the "gotchas" that I know of for pulling out parts of the backup. :) The table prefixes and the "CB exception" are about the only tricky parts.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

netzagentin
Hi guys

I followed your posts here because I have a big problem with one akeeba backup restoring and cb. cb is not working and I have a lot of errors. So now I searched in forums and found out here there is an exception. Good to know, bad to know it after restoring a productive site. :-(.

So please help me. I haven't understood what to do with the cb tables prefixes. Could you please explain it to a SQL beginner? I would be very glad.

The situation is now:

I restored one akeeba backup file and installed it with complete process. Database is komplete. Site is working. I have only errors with cb.

Thanks a lot
netzagentin

dlb
What version of Akeeba/JoomlaPack did the backup? This is an old bug, fixed in the 2.3 series if I recall correctly. So a normal restore would properly not replace the abstracted table name in the CB data records. The original poster was asking specifically about doing this manually, so he needs to manually restore the table prefixes. The actual manual restore instructions with the proper Search and Replace commands are here.

Community Builder is not normally a problem to restore, what sort of errors are you getting?


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

netzagentin
I use akeeba backup pro 3.
And the errors I get from community builder by testing with cb tools option. There are different tools. The one which delivers errors is 'Check Community Builder User Fields Database' as shown in attachments. The message is table jos_comprofiler does not exists. But it exists.
CB is actual in version 1.2.2 and sbSubs in version 1.0.3. I also post it in joomlapolis forum for help.


Thanks a lot for your support
netzagentin

dlb
There is no known problem restoring a site with CB from a backup done with Akeeba 3.0 stable.

I have a wild guess on what happened. Linux servers are case sensitive. You say your jos_comprofiler table is there, but CB says it is not, check the capitalization of the table name.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

netzagentin
Hi Dale

I took a look and it seems to be the correct name and capitalization. I took a screenshot of db. Could you figure out something?

kind regards netzagentin

dlb
OK, it was a good idea, but wrong. I'll ask Nicholas to look at this to see if the solution jumps out at him.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

nicholas
Akeeba Staff
Manager
This is a bug in Akeeba Backup 3.0 stable. It accidentally translates all instances of #__ in the query with the database prefix. I am fixing this for Akeeba Backup 3.0.1. Meanwhile, you can use the latest developer's release.

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!

netzagentin
Hi Nicholas
thanks a lot for your input. I will do that. So now how can I fix now my restored installation? If possible I can pm the access to joomla.

Thanks a lot
netzagentin

nicholas
Akeeba Staff
Manager
Do you still have the backup file? If so, do the following:
1. Extract the backup file locally, using eXtract Wizard.
2. Download the installation ZIP archive of the latest developer's release.
3. Find the backend/installers/abi.jpa file in the archive and copy it on your desktop.
4. Extract the abi.jpa file with eXtract Wizard.
5. Use the extracted files to overwrite all existing files from the extracted backup archive. That means, drag the installation directory extracted from abi.jpa in the folder where you extracted the backup archive and accept all overwrites. This will have the effect of having the new version of the ABI installer with your existing database dump inside the installation directory.
6. Upload ONLY the installation directory to your site.
7. Run the restoration script, by visiting http://www.yoursite.com/installation/index.php
8. Go through all installation steps like you were restoring a site. When done, remove the installation directory.
9. Now, go to your site's backend, Components -> Community Builder -> Tools and click on the Check CB database link. It should find only one error. Click to fix it and you're done without data loss.

I hope that helps :)

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!

netzagentin
Hi Nicholas
Sorry but I need your help again. I was too busy to try your solution. And now the productive webpage was changed too often so that I can't try your way right now with an old backup file.
So my question is:
Can I fix my database bug manually? For testing I created a developement environement on the same server as production is. But with a different database. Now I have a second complete webpage with database installation to test any fixes.

Thanks a lot for your help.
Tanja von Hopffgarten
netzagentin

nicholas
Akeeba Staff
Manager
The only way if you can't use a backup is to manually edit the CB extra fields table and manually changes all instances of your prefix with #__. You can do this with any MySQL tool supplied by your host, such as 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!

netzagentin
Thanks for your quick answer. I am a bit lost. Because in my database all tables have the right prefix: jos_. All cb tables seem to be right. I installed cb at another joomla environement and compared them. Nothing seem to be wrong with the prefixes. I use phpMyAdmin for checking the tables. I think there should not be a prefix #_ at cb tables. So I have no idea what the bug is. There is still the error message (see post 7 here) when I do the tests in cb tools. And the userlists are still not working.
Do you have any other idea?
Thanks a lot

Hi again

now I could solve everything. The solution was:

change manuall by using db tool (phpMyAdmin) all entries in the table jos_comprofiler_fields where column 'table' contains 'jos_comprofiler' to 'akb_comprofiler'.
Now userlists also working fine.

Thanks again for your great support.

greets
Tanja

nicholas
Akeeba Staff
Manager
Don't look at the name of the table. Look at the contents of the extra fields table. You will see that some entries start with jos_. Have them start with #__ and it will be fine. I'm not a CB expert, maybe you want to ask Nick A. on the CB forums for more detailed instructions regarding fixing the extra fields?

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!

netzagentin
I asked in cb forums and got the solution. You figured out my missunderstood. I was looking allways on the table names. Now everything is clear and solved :-)
Thanks a lot for your great support.
Tanja

nicholas
Akeeba Staff
Manager
It was actually Nick A. who hinted me on the existence of this issue, after he had helped another user to resolve it. So, I guessed he knew the procedure much better than yours truly. I am glad I was right :)

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!