• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Reimport threads, posts (and attachments) from users with id 0

Triops

Well-known member
#1
So, some weeks ago I finally did the migration from vbulletin to xenforo. Although I tested a dozends times before I now recognize some glitches I would like to correct manually. To start over (do migration again) is impossible, since the migrated forums is heavily active again already.

One of the most important things is, that lots of threads (and probably the contained posts and attachments and ?) were not imported correctly, when a user had the userid 0, which means guest/deleted. Probably I did set an option wrong before migration. Or they were deleted shortly after migration, but I do not know what should have happened. I deleted once a user after migration with his posts and the query started to run much too long and started counting "300..." (I stopped it immediatly) - maybe this deleted old threads with userid 0 too? I don't know, will check in a database shortly after launch.

I just checked - there are lots of threads with user_id 0, so they were imported! But upto thread_id 800 those threads from deleted users are now missing.

Anyway, there are now lots of threads which I really would like to reactivate, because they contain some of the early "masterpieces" from ancient times in my forums.

These threads are still available in my last local test migration (so they were imported then), so I have both - the original vbulletin database and a xenforo 1.5 database, which contain these threads and all their posts and attachments (something I miss, which is part of a thread?)

Is it possible to select these threads (and their posts and attachments) with SQL queries and imported them again (with their original IDs) into the live database? A check, if not already existing, would be obligatory. But I had a look, at least the first 200 of these threads/IDs are really missing in live database.

Additionally I would select single posts + attachments of these id 0 users, because they of course not only started new threads but took part in other threads too...

Any help is highly appreciated, thank you in advance!
 

Mike

XenForo developer
Staff member
#2
Unfortunately there isn't any way to import anything selectively like this. It would likely require specific custom development to do what you want.
 

Triops

Well-known member
#3
Thank you Mike.
But the threads and posts were (very probable) imported correctly at migration (and deleted later), so no ID conflict should accour.
I could select/export those threads from an existing xenforo database. Same with posts. And reimport them into the live database.
I would be even willing to check and select upto 800 threads manually to get only those, which were deleted.

What would conflict/speak against this way (other to get the correct SQL queries), please?