News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[SMF Converter] XMB - 1.9.8

Started by JayBachatero, January 08, 2007, 09:21:48 AM

Previous topic - Next topic

SleePy

Is there a way I could look at it maybe?

That is quiet interesting that nothing is sent out at all :|
By that I think it would of died, but an error should of been sent to output.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

Ok,

This happens to be the query that is locking up:
SELECT
    t.tid AS ID_TOPIC, t.topped AS isSticky, t.fid AS ID_BOARD,
    IFNULL(uf.uid, 0) AS ID_MEMBER_STARTED, t.replies AS numReplies,
    t.views AS numViews,
    CASE WHEN t.closed = 'yes' THEN 1 ELSE 0 END AS locked, MIN(p.pid) AS ID_FIRST_MSG,
    MAX(p.pid) AS ID_LAST_MSG, IF(t.pollopts != '', t.tid, 0) AS ID_POLL
FROM ({$from_prefix}threads AS t, {$from_prefix}posts AS p)
    LEFT JOIN {$from_prefix}members AS uf ON (uf.username = t.author)
WHERE p.tid = t.tid
GROUP BY t.tid
HAVING ID_FIRST_MSG != 0
    AND ID_LAST_MSG != 0;


Right now, I can't get it to unlock the tables (I tried to kill all the query processes it was running but that didn't help).
I can't honestly see what would be causing that to lock up.

Do you mind if I tried it locally on my own machine with a copy of your database?
I would have more range here to play and if I lock something up it doesn't hurt me locally to quit the applications themselves such as mysqld :P
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

PatrickPriest

Sure.  Do what you need to do.  I really like SMF and want to switch.  So I am really hoping we can figure this out.

Also... please keep in mind that this is just a "TEST" database and forums.  The real active forum is not being touched by the convert process yet.  Once we figure out what's going on and I do a few tests to make sure everything went smooth... we can convert the real forums!!!

locjan

why we can convert other forum to SMF. is all forum had the same structure
locjan.com - Free Korean Dramas OST shwoomp.com - Art of shwoomp

SleePy

#144
PatrickPriest,

I had time today. I only changed a few things in the converter and it finally made it past the topics part :)

It did die out in the end due to this error:
QuoteMySQL error message:
Got a packet bigger than 'max_allowed_packet' bytes

http://forums.mysql.com/read.php?35,75794,75794

You can see there it is just a variable in MySQL that needs to be set to allow this (see the second post for the offered solution but you should use a higher value most likely).

Now to tell  you. I started this about 5 pm and it took until 8:30 pm to finish converting posts.
Well you have way more personal message data than you do posts data. So this section might even take longer :|

Sadly there isn't much that can be done. With a 500k board and converting about 500 posts at a time (so as to not harm the server from a super large query). This is something that might take a while.

But for the most part the convert.php and xmb_to_smf.sql that are in your SMF folder are the ones I used..

btw, this is the string I used in ssh:
First:

cd public_html/smf


Then:

php convert.php --path_to=/home/xxxx/public_html/smf --path_from=/home/xxxx/public_html/test --db_pass=xxxx --convert_script=xmb_to_smf.sql --debug

I took out all sensitive data. The debug part isn't needed at the end. But I had it incase it would tell me anything extra. It didn't really. Debug mode doesn't do much more than normal mode at the moment.. I plan on getting that fixed :P
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

PatrickPriest

So the private messages are what is locking up the convert? Those can be deleted.

SleePy

No there where not locking up the conversion.
I changed the topics query slightly (from what I posted above) and was able to finally get it to work.

The PMs though are very large it looks like. I don't know how long it would take you to convert them. If you don't need them, then emptying the xmb_u2u table would delete all pms (which totals about 700 mib of data from what I seen in your phpmyadmin).

You should though be planning on this taking some time. If you have a couple days off work, doing it at night when things are quiet and the forum can be offline for a couple of hours while you convert (so that way no new data is inserted during the conversion) would be the best way to go.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

PatrickPriest

So no code in the files need to change?  You only got it to work on your local machine.  Did you try it on the actual server or you can't because of the packet size?

I guess what I am trying to say is... what's the next step I need to take?

SleePy

That was on your site I got the error. I didn't even take it local. I seen why I think what was causing it. Just letting it sit for a day for the tables to properly unlock and such is what helped finally test it though :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

PatrickPriest

#149
So I could just delete all the PMs... and run it through SSH??

JayBachatero

In PHP you need to pass the -- option to pass arguments to the php script itself.  So this should work.


php -f convert.php -- --path_to=/home/xxxx/public_html/smf --path_from=/home/xxxx/public_html/test --db_pass=xxxx --convert_script=xmb_to_smf.sql --debug
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

PatrickPriest


[root@server ~]# php -f convert.php -- --path_to=/home/xxxx/public_html/smf --path_from=/home/xxxx/public_html/test --db_pass=xxxxxxx --convert_script=xmb_to_smf.sql --debug
Could not open input file: convert.php
[root@server ~]#

JayBachatero

Use the full path to convert.php.


php -f /path/to/convert.php -- --path_to=/home/xxxx/public_html/smf --path_from=/home/xxxx/public_html/test --db_pass=xxxx --convert_script=xmb_to_smf.sql --debug
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

PatrickPriest

it's in the process.  i will see how this works and report back.  thank you.

PatrickPriest

Why would I be able to see the members that converted... but not the Boards or Topics?  Posts are currently still converting.  I also deleted all the PMs so that way that shouldn't take no time.

SleePy

The cleanup at the end has not occurred yet. So that may be why

It could be possible as well that permissions are in effect and you would need to login to see them.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

PatrickPriest

I am logged in.  They don't show up in the admin center either.  Just thought it was weird that I could see the members list and it have all of them... and not be able to see any of the boards.

JayBachatero

You need to wait for the whole process to complete.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

PatrickPriest


JayBachatero

If you want you can check the data in the database.  You can see what has been converted there.  Like boards and categories and you can see the total rows updating for the messages table as well.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: