Migrating vBulletin 5 database - Import script errors

Well, “bad news” for you Jammy then.

We decided that the script is in such an unfinished state that we are writing it from scratch to migrate directly our vb3 installation into discourse. Using C# as well which makes it several order of magnitude faster.

If we manage to make the script “generic” enough we will open the github to the public but I doubt there will be much interest anyway in migrating old communities still stuck on vb3 today.

2 Likes

Just a quick update. Thanks to the work of an incredibly dedicated small group we are nearly done.

From next Monday we will start a few test runs on a staging machine but the results are promising.

This is the total numbers we have:
image

Size-wise, the DB in vbulletin3 format is around 8GB.

And the tests run from local machines connecting to the source db remotely is of around 6 hours to complete.

The script migrate all forum/subforums, translating them in categories and subcategories. Requires 3rd level subcategories because we have quite an old-style forum and there are some “clan” forums hosted there that are really REALLY nested in.

Anything beside the 3rd level is automatically converted in a tag, maintaining the hierarchical structure it had in terms of parent/child subforum relationship (using tag groups).

Every subforum that was either set with custom permission (read only for example), or mods/admin only or again, just hidden with password access, is getting migrated as “only accessible to staff” instead. They will be around a dozen in the end and we can have the staff re-enable them for the correct usergroups manually.

Users, usergroups and private messages are migrated as well. Private messages are migrated the “discourse way” meaning that instead of N topic with 1 message as you would see in a simple 1:1 migration of the database (silly database structure really), it will have the thread-organized way that discourse uses.

The script also does already the cooking, to speed up the process, for all posts.

Topic and posts migrations is done with several parallel connections and will always try to use as much connections as the source DB allow for.

We’ll see how much time it takes on average on a small 2vcore/4gb RAM but it’s already several order of magnitude faster than the current (unfinished) bulk migration script that is available.

Several parts could be optimized better and LOTS of it is really custom designed for our forum (we have even mapping in json to reorganize lots of the forum structure so it’s less chaotic) so I doubt it could be raised and used by anyone else without some tinkering but we’ll discuss internally if we want to open the source repo to the public after our migration completes.

1 Like

Final update I guess.

We finally managed to align everything (infra, code, users, mods, etc) and migrate. It happened yesterday. I won’t link the community as I can’t recall if it’s allowed and anyway it’s quite a well known community in Italy.

These are the numbers we do on average in 30 days, bots already filtered.

There was of course quite the pressure onto the team of volunteers that took care of it, and now it’s not finished yet as we are still ironing out the custom theme and some of discourse background settings (I’ll have to open lots of topics asking for help/clarification/directions it seems).

Our script managed to migrate everything we wanted:

  • users
  • user groups
  • moderator/ban/admin status
  • private messages
  • categories
  • topic
  • replies

and so on and so forth. We also integrate the cooking in the migration process itself as we have some customization in vbulletin to allow for embedding tweets, youtube videos and other stuff that wouldn’t translate well with how discourse cook them by default.

We run the tests on a 4vcore/8GB and the whole migration completed in around 7-8 hours
For production we raised enough our patreon to afford an 8 vcore / 30 GB and the whole thing took 4 hours.

We did a live of the migration, with a couple of false start included (of course :stuck_out_tongue:) and some music in background. We have had quite some fun.

You can see the details of the number of topics/post and the timing in the screenshot.
The three timing are: time to read, time to cook, time to write.

It has been an exhausting but exilarating adventure and, @pfaffman, believe me, you dodged a bullet when I decided to not employ your help.

As of today, the count of the hours only of MY time for this project roughly estimated for £ 25k :rofl:
I’m not counting the time the other three people dedicated to it in the past 2 months or so, often working on it late at night.

We are still running some post-migration script, one that import all avatars and another that create all the permalink redirect so that link written inside replies that still point at the old URL format will actually redirect properly. I expect those to finish in the next 24 hours.

We’ll discuss, in a couple of weeks or so, if we can clean up the repository of our script and offer it open source. I can’t take that decision alone of course.

Edit: Just adding the complete migration of all user avatars + permalinks of internal references to topics/categories

Run after the main data migration.

Cheers

3 Likes

That sounds true. Your code sounds pretty great, though just letting the script run for a month would likely have given the same end result. A final import likely would have run in a few hours or maybe less.

Glad you got it done! Congrats on a job well done

1 Like

I mean, the point was to not close the website down for a month waiting for it to migrate :slight_smile:

Also, kinda hard when the official script is missing pieces :thinking:

You wouldn’t have needed to. You’d run the script, leaving the site up. When the scipt finished, you’d run it again; it would skip the alread-imported data, so it would run much faster. You might need to do that a couple of times, but eventually it would finishe in minutes or hours, as there wouldn’t be much new data to process. Then you’d freeze the old site and run it a final time. By default the script checks each user & post, but you can also set IMPORT_AFTER to provide it with a date so that it completely ignores the older data, so it would take very little time.

Hi! I’m one of the guys who worked on this.
Personally, it has been a very enriching learning experience, and we still have to iron out the last issues, but the whole community has reacted positively: the new forum reaction thread reached…

well, this number of posts in about 24 hours :smile:

I don’t know how many other cases are out there, in the wild, of vB3 installations that need migration, but - hoping this thread might help someone in the future - it can be done, don’t despair too much. It’s a lot of work, but it can be done :smile:

3 Likes