Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Tamagochi on November 03, 2011, 11:14:15 AM

Title: Retrieve old forum post in the new DB Different
Post by: Tamagochi on November 03, 2011, 11:14:15 AM
Hello

The problem is that I had a phpnuke forum, and I go to smf, but the converter does not work for me. Since then and for some time now, I have been passing one to one quote posr but of course is a real ordeal.

Today I got up my courage and patience and I managed to get the converter polishing each error to pass it to another forum (for fear that if I went to the new erase all messages). Now it is easier I think it would be moving from one forum to another SMF 2.0.1 smf 2.0.1 with that if the two messages. As I can merge the posts in both forums in the new (actually the least new to the new one is to pass everything but the one in use is the other)?

Other users and would give me a bit like the new forum as in use have been recorded most users, but messages need to merge (obviously if you can do everything better), you can help me please?

The forum is in use www.summarios.com and the forum old messages is www.summarios.com/foropalo if that helps you.

Excuse my ugly english, but I try the google translator, I understand better than I wrote, Please help me.

salu2
Title: Re: Retrieve old forum post in the new DB Different
Post by: Chas Large on November 17, 2011, 07:08:00 AM
If you have PHPMyAdmin or some other tool available for database operations (cPanel item) then you can EXPORT from one database to a file then IMPORT to another database but you need to check the table format is the same first.
Title: Re: Retrieve old forum post in the new DB Different
Post by: Tamagochi on November 17, 2011, 02:52:49 PM
Hi,

I have phpmyadmin, but, if I import old database in the new one, this will erase the new data no??

Best Regards
Title: Re: Retrieve old forum post in the new DB Different
Post by: Illori on November 17, 2011, 02:54:22 PM
it will override any changes/posts/new users etc since the backup was taken
Title: Re: Retrieve old forum post in the new DB Different
Post by: Tamagochi on November 17, 2011, 03:10:05 PM
Hi,

Yes, that's the problem. This isn't a back up. There are 2 differents databases with post, users, etc, and I need to merge both, or at least the post from my old forum database, to my new forum database. Both contain data.

Could you help me to do that?

Best Regards
Title: Re: Retrieve old forum post in the new DB Different
Post by: Illori on November 17, 2011, 03:11:43 PM
nope i got no idea how to merge the data
Title: Re: Retrieve old forum post in the new DB Different
Post by: Chas Large on November 17, 2011, 04:48:32 PM
With PHPmyAdmin, you can browse the data in individual tables and select those items. You can also run searches. When you've found the data you want you select those items and EXPORT them to a separate .sql file.

Once exported, you can then select the table of the second database and IMPORT that exported data from the first database.

All you need to check is the format of the tables are the same. Assuming it's the smf_messages table it will look something like the attached which is only part of the table headings.

There is no real need to know the SQL query involved as phpMyAdmin can do it all for you through the GUI but you can see the query generated.

I would strongly suggest testing the procedure on a couple of test databases before you do the actual move. Create a new database and IMPORT a backup file into it, it's really easy. The look and browse the database through the GUI. Then create another and Export & Import between the two. No need to get SMF involved for this. When you're happy, back up your main database and then do the job for real.

I have done this several times where a database has been corrupted or when old posts had been deleted completely but needed to be restored.

When you're finished, run the recount and check Maintenance procedures from SMF and all should be well. :)
Title: Re: Retrieve old forum post in the new DB Different
Post by: Tamagochi on November 17, 2011, 05:14:49 PM
Hi,

Thanks a lot for your help. But the ids don´t have conflicts?? Maybe not, but I never used phpmyadmin and my knowledge about is minimal.

My database have smf_messages, and my old database is smf2_messages (and all tables of course, amf the actual database and smf2 the older)

Could you explain me please??

Best Regards
Title: Re: Retrieve old forum post in the new DB Different
Post by: Chas Large on November 18, 2011, 03:39:09 AM
Sadly I cannot give a tutorial here on how to use phpMyAdmin suffice to say it is a GUI and easy to use if you read the documentation that comes with it, it is very extensive.

Your alternative is to learn SQL and write your own queries.

Even if the prefix for the two tables is different, this is merely a database identifier, if the columns in the tables are the same, then the data cab be transferred between the two databases.

Sorry but I don't feel I can offer any more assistance than I have already given.
Title: Re: Retrieve old forum post in the new DB Different
Post by: Joker™ on November 18, 2011, 07:47:31 AM
Tamagochi, if I'm understanding this topic correctly you want to merge the message of 2 forums in one database. Am I correct?

If thats the case, we might have to consider a lot of things in here
- Clash of message table id's
- user post count
- log tables

TBH I don't think it'd be that easy, but somehow I found this topic (http://www.simplemachines.org/community/index.php?topic=332894.0).
Title: Re: Retrieve old forum post in the new DB Different
Post by: Tamagochi on December 02, 2011, 09:48:15 AM
Hi,

First of all sorry for the delay to respond you, but I was working on it and on my work, and I haven't time enough.

Thanks a lot, that works early properly, and now I have almost all done. You can check it here: http://www.summarios.com/foro/

By the way I traduce the post to spanish, couse in spanish I didn't found something to do this. I include some apretiations from my process. You can find here in spanish:

http://www.creatupropiaweb.net/foros/como-mezclar-dos-foros-smf-usando-mysql/

Thanks again for your help.

Best Regards
Title: Re: Retrieve old forum post in the new DB Different
Post by: Joker™ on December 02, 2011, 12:31:45 PM
Wow, thats great. I'm very glad that you placed your heart in completing the task. Marking this topic as solved for now, but if you need any further assistance with this do post here. Congrats once again ;).

I think I should try to find some time and test the code :P.
Title: Re: Retrieve old forum post in the new DB Different
Post by: Impsat-1 on July 01, 2015, 05:27:13 AM
Quote from: Tamagochi on December 02, 2011, 09:48:15 AM
Thanks a lot, that works early properly, and now I have almost all done. You can check it here: http://www.summarios.com/foro/

Mmm.... hi Tamagochi can you help me to do the same in smf 2.0.10??, I tried but don't work for me
Please... if you can...
Thanks a lot
Regards
Have a Great Time 8).-