Importing from vBulletin 4

No budget for this. But. Maybe.


Anyone seen this problem when running the import script?

Postprocessing posts…
37785 / 48843 ( 77.4%) Killed*

The process was killed before completing. When I load the Forums, the imported messages seem to be there, bit I am worried it didn’t gracefully complete and there will be problems.

Any recommendations? Perhaps an out of memory error? Can I simply re-run the script to pick up where it left off or will it try to re-import duplicate data? Thank you.

Rerun the script. It will not duplicate data.

1 Like

Thank you, @pfaffman! This worked great.


First off thank you for this fantastic guide. I appreciate the work that’s been put into this.

For my issue
I’m having trouble with connecting to the database when I run the import script, albeit I’m using Mariadb to house the vbulletin dump rather than mysql. I’ve verified that MariaDB is running, I’m able to import my vbulletin dump into it, and I’ve quadruple checked the username, hostname, and password in the script but still no luck.

I feel as though I’m missing something simple, if someone could point me in the right direction that’d be very helpful

I’m using the following versions

mysql2 0.5.2
dicourse master git commit cb8fa46

Full description below

When I try and run

apt-get update && apt-get install libmysqlclient-dev mysql-server-5.7

I get an error

E: Package 'libmysqlclient-dev' has no installation candidate
E: Package 'mysql-server-5.7' has no installation candidate

which makes sense, perhaps those packages have been removed from the repository in this time.

So instead I run

apt-get update && apt-get install mariadb-server-10.3 libmariadbd-dev

Mariadb works as a drop in replacement which is nice because all steps work up until I try to run the migration script at which point I get the error

root@discourse:/src# su discourse -c 'bundle exec ruby script/import_scripts/vbulletin.rb'
root:@localhost wants vb4
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
Access denied for user 'root'@'localhost'
Cannot connect in to database.

Hostname: localhost
Username: root
database: vb4

Edit the script or set these environment variables:

export DB_HOST="localhost"
export DB_NAME="vbulletin"
export DB_PW=""
export DB_USER="root"
export TABLE_PREFIX="vb_"
export ATTACHMENT_DIR '/path/to/your/attachment/folder'


For permissions

root@discourse:/src# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 59
Server version: 10.3.17-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show grants;
| Grants for root@localhost                                                                      |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION                                  |
2 rows in set (0.000 sec)

I have double checked the username and password many times, and even manually set it myself.

1 Like

I did a little bit more digging and found that the base image change from Ubuntu 16.04 to debian is certainly the culprit for why mysql is no longer available, but still baffled on how to get mysql2 to connect to MariaDB.

I submitted a PR a while back that makes the mysql-dep.template.yml use MariaDB. I’ve used it several times.

It looks like you are trying not to use a password? I recommend using a password. The script assumes that there is a password.

Got it. I’ll try setting a password and seeing if that works. From what I gather though the import script should still work with MariaDB. If so I’ll keep troubleshooting. Thank you for the quick help!

@pfaffman That was it! Thank you so much. Once I get my forum in order I can send a pr for a VB3 version I had in case it’ll be useful to anyone.

This is also my test instance so I’m ok posting the details, it’s going to get torn down :slight_smile:

1 Like