How to convert vBulletin 4 database to Discourse?

Hi,

I’ve a big board with a database of over 8GB size with vBulletin 4 and I’m evaluating to switch my forum to Discourse.

So, I’m trying to convert my vB4 db to Discourse: how to do this? I’ve noticed the script at this link https://github.com/discourse/discourse/blob/master/script/import_scripts/vbulletin.rb but I don’t know how to execute it and what it needs.

Is there any guide about vB4->Discourse conversion?

(Actually, i’ve any experience with Ruby and Docker).

If you look in #howto there are a few guides on importing existing forums, I am not sure if vBulletin is specifically there, is it @erlend_sh?

1 Like

Seems that there isn’t any guide about vBulletin import script.

I’m giving a look to phpBB and Xenforo guides, is the procedure similar for vB4?

Actually I only tried to do the following steps:

  • Edited the import ruby script in /script/import_scripts/vbulletin.rb saved in the Docker container with the MySQL user and database information.

  • Entered the container bash by “docker exec -it app bash” command

  • Give the following command: “bundle exec ruby script/import_scripts/vbulletin.rb”

After giving this command, I get these errors:
“script/import_scripts/vbulletin.rb:404: syntax error, unexpected keyword_else, expecting keyword_end
script/import_scripts/vbulletin.rb:754: syntax error, unexpected keyword_end, expecting end-of-input”

What I’m doing wrong?
Please don’t limitate to recommend me to buy any export service, actually I can’t afford it and I’m trying to learn (and I need to test first and after decide if switch or not to Discourse, so I can’t waste my money): this is an open suorce software and community, but seems that you’re purposely making the importing question so complicate to make some money. Every topic I read about this question only I see offers to buy some expensive service to get the database converted.

Many forum owners are happy to pay a few hundred bucks to a freelancer from the community to have their forum migrated. I understand that this is not an option for everyone and that’s perfectly ok. We’re not trying to impose limitations on you; we’re merely giving you options. As for the lack of tutorials, we’re actively sponsoring technical writers to write tutorials for our open source migration scripts, so please don’t imply that we’re purposely complicating our import pipeline.

5 Likes

There does look to be an extra end or a missing conditional in this area of the code.

https://github.com/discourse/discourse/blob/master/script/import_scripts/vbulletin.rb#L392-L406

2 Likes

I really hope so, because it is so strange that there’s guide for minor boards like XenForo and bbPress and not for largely adopted major forum software like vBulletin and Invision.

Anyway, I think that you should invest seriously more time and attention on the database convert/importing question because it is something of crucial for many forums that want to switch to Discourse and not all can spend hundreds bucks only to get a script, with severe lack of documentation (this could make troubles also to an experienced dev), to work.

It should be similar to the Kunena3 import. You’re probably better off installing a Development environment than trying to it in a container.

The importers that get developed are the ones that Discourse’s customers need.

You get the script for free. For $100-200 bucks you could get someone to import your data for you and give you a backup file that you could restore on your server. It’s likely that there’s something funky with your database, or the script doesn’t import everything you want, though. (I don’t know about the vBulletin script, but the Kunena3 script doesn’t deal with attachments, for example.) When I do an import, I clean up the script a bit, and if when I get time, I submit those improvements back to the community. (And Real Soon Now, I’ll submit code for providing links to attachments in Kunena3. Sometime later, someone will fix it so that those attachments get squirted into Discourse rather than linked to where Kunena is storing them.)

I think there’s something going on that you haven’t realized: the team doesn’t consider “migrating to Discourse” a top priority that needs to be as easy as possible. They do consider “start a new Discourse forum” to be a top priority, and “making Discourse awesome once it’s set up” to be a top priority.

So it doesn’t really bother them that the import scripts are unmaintained or hard to use… “we’ll just fix it when we need to use it again”.

2 Likes

So, Discourse Team isn’t interested in existing forum to switch to their software? Unhappy decision at my vision and anyway the problem isn’t that it “needs to be as easy as possible” but that actually those converting scripts are close to be unusable.

We can agree on the fact that mantain a converting script for every existing forum software is likely to be impossible (and time-wasting), but that’s ridiculous that there isn’t nothing also for the most popular forum boards like vBulletin and IPB.

If I start to give away free Passion Fruit Ice Cream I’m being ridiculous because I should provide Chocolate and Strawberry flavors, that are more popular?


The team provides import scripts as Open Source, and make guides whenever they do any new import.

That’s awesome!

3 Likes

Sorry if I’m being a bother here, but is the script broken or am I not reading it correctly?

3 Likes

Looks like it is. The last commit was a big one.

However I don’t have a vBulletin dump to do the testing.

3 Likes

That’s what I was going to say. :slight_smile:

If I had a database I could write a HOWTO, and make trivial changes to the script (so that it would run, at least).

6 Likes

Thanks

@Matheeus can you remove or comment out that “end” line (#403) any try to import again?

EDIT

Moot suggestion - this error in the script has been fixed.

I could do a fresh vB4 install, export the db in sql dump and give it to you if could help.

I try asap.

1 Like

After reading Kunena3 and XenForo guides, I installed MySQL directly into the Discourse’s Docker container, but I’ve problems into importing the 8GB dump into the mysql database, seems that I don’t have enough space:

root@disc3-app:/# df -h
Filesystem                                                                                        Size  Used Avail Use% Mounted on
/dev/mapper/docker-253:0-519439-486e36cd4557a419fe2143dcf25918218a17d89ab6ee152375945feb4f41554f   10G   10G   20K 100% /
tmpfs                                                                                             3.9G     0  3.9G   0% /dev
tmpfs                                                                                             3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/vg-lv_root                                                                             47G   20G   25G  45% /shared
shm                                                                                                64M  4.0K   64M   1% /dev/shm

But my VPS have a disk of 50GB, in fact if i give the same command directly to CentOS I get:

Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/vg-lv_root   47G   20G   25G  45% /
devtmpfs                3.9G     0  3.9G   0% /dev
tmpfs                   3.9G     0  3.9G   0% /dev/shm
tmpfs                   3.9G   25M  3.9G   1% /run
tmpfs                   3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1               477M  130M  319M  29% /boot
tmpfs                   798M     0  798M   0% /run/user/0

Seems like Docker creates a “partition” with only 10GB, how can I expand it?

Yes, there was a missing if condition and extra end, just fixed via:

https://github.com/discourse/discourse/commit/92e716a1fd907ee96e9b7ef557e4a71843f49084

6 Likes

Looks like CentOS might run Docker with the devicemapper storage backend, instead of something sane. According to to the docker-run manpage, adding something like --storage-opt size=20G to the docker run command should give you a new container with a larger root filesystem, but quite frankly, I’d send devicemapper to Davy Jones’ locker and use the aufs storage driver instead.

I’ve tryied with this guide: Increasing the Base Device Size on Docker Daemon Restart — Project Atomic

But the only thing I got is to corrupt my Discourse container and also if I recreate it i get some strange errors and so I can’t bootstrap/start the container.

How I can switch to the aufs storage driver?

I’m trying your fixed script, but I get this error:

root@disc3-app:/# bundle exec ruby /var/www/discourse/script/import_scripts/vbulletin.rb
/var/www/discourse/config/application.rb:2:in `require': cannot load such file -- rails/all (LoadError)
        from /var/www/discourse/config/application.rb:2:in `<top (required)>'
        from /var/www/discourse/config/environment.rb:2:in `require'
        from /var/www/discourse/config/environment.rb:2:in `<top (required)>'
        from /var/www/discourse/script/import_scripts/base.rb:14:in `require_relative'
        from /var/www/discourse/script/import_scripts/base.rb:14:in `<top (required)>'
        from /var/www/discourse/script/import_scripts/vbulletin.rb:2:in `require'
        from /var/www/discourse/script/import_scripts/vbulletin.rb:2:in `<main>'