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.
Thank you, @pfaffman! This worked great.
Hi,
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
mariadb-server-10.3
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
Password:
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'
Exiting.
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 ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION |
| 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.
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 
Thank you all for the help, the migration went mostly well. There were a couple missing attachments here and there but overall this went great.
For those reading in the future I migrated from Vb3.8.7
I needed to make some edits to the sql query in vbulletin.rb, as my database structure didn’t exactly match the script but it was pretty close. I decided to give up the custom captions to get things moving.
Github diff: File fix other by canyon289 · Pull Request #1 · canyon289/discourse · GitHub
For the MariaDB installation that replaces mysql I used the following command.
apt-get update && apt-get install mariadb-server-10.3 libmariadbd-dev
and to change my MariaDB password from null to a value this link was the most comprehensive
Again I can’t thank the people in this thread enough, and all the contributors to discourse for code and help!
I just finished a migration, and it gave all 2,000+ topics a category inherited from the vBulletin 4 instance. It will not let me delete this category and set all these migrated posts back to no selected category. “Can’t delete this category because it has 2322 topics”
Is there a workaround for this?
Either re-migrate or change the category on those topics. With that many you will need to do it from the Ruby command line.
こんにちは、
この文脈が少しわかりません。
添付ファイルを Discourse インスタンスにコピーしてください(パスについては VB4 の設定を確認してください)。
どなたかお手伝いいただけますでしょうか?
こんにちは、
vBulletin 5 のスクリプトがあることに気づいたのですが、それに関するフィードバックが見つかりません。このトピックの情報は、それにも適用されますか?
ありがとうございます!
スクリプトは非常に同様に動作するはずです。
vB4 のインポートを実行していますが、子カテゴリのインポートで失敗しています。Rails/Ruby の初心者なので、ご辛抱ください。
Traceback (most recent call last):
20: from script/import_scripts/vbulletin.rb:943:in `<main>'
19: from /home/vagrant/discourse/script/import_scripts/base.rb:47:in `perform'
18: from script/import_scripts/vbulletin.rb:84:in `execute'
17: from script/import_scripts/vbulletin.rb:293:in `import_categories'
16: from /home/vagrant/discourse/script/import_scripts/base.rb:403:in `create_categories'
15: from /home/vagrant/discourse/script/import_scripts/base.rb:403:in `each'
14: from /home/vagrant/discourse/script/import_scripts/base.rb:422:in `block in create_categories'
13: from /home/vagrant/discourse/script/import_scripts/base.rb:454:in `create_category'
12: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/suppressor.rb:48:in `save!'
11: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/transactions.rb:319:in `save!'
10: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
9: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/transactions.rb:212:in `transaction'
8: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/database_statements.rb:281:in `transaction'
7: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
6: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
5: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
4: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/database_statements.rb:281:in `block in transaction'
3: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
2: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/transactions.rb:319:in `block in save!'
1: from /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/validations.rb:53:in `save!'
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/validations.rb:81:in `raise_validation_error': Validation failed: Slug is invalid (ActiveRecord::RecordInvalid)
トラブルシューティングのためにいくつかのデバッグ出力を追加しました。カテゴリの slug の値は nil になっています。
create_categories(children_categories) do |category| をループしている間は、カテゴリは有効に見えるようです。base.rb の def create_category から、.save! の直前に opts、import_id、new_category もログ出力しています。関数が期待する値としてはすべて有効に見えます。
以前にこの問題に遭遇したことはありますか?
37 / 53 ( 69.8%) [345139 items/min]
category:
{"forumid"=>355, "title"=>"News", "description"=>"RSS Feed", "displayorder"=>6, "parentid"=>205}
Entering create_category...
opts:
{:id=>355, :name=>"News", :position=>6, :description=>"RSS Feed", :parent_category_id=>6}
import_id:
355
new_category:
#<Category id: nil, name: "News", color: "BF1E2E", topic_id: nil, topic_count: 0, created_at: nil, updated_at: nil, user_id: -1, topics_year: 0, topics_month: 0, topics_week: 0, slug: nil, description: nil, text_color: "FFF", read_restricted: false, auto_close_hours: nil, post_count: 0, latest_post_id: nil, latest_topic_id: nil, position: 6, parent_category_id: 6, posts_year: 0, posts_month: 0, posts_week: 0, email_in: nil, email_in_allow_strangers: false, topics_day: 0, posts_day: 0, allow_badges: true, name_lower: nil, auto_close_based_on_last_post: false, topic_template: nil, contains_messages: nil, sort_order: nil, sort_ascending: nil, uploaded_logo_id: nil, uploaded_background_id: nil, topic_featured_link_allowed: true, all_topics_wiki: false, show_subcategory_list: false, num_featured_topics: 3, default_view: nil, subcategory_list_style: "rows_with_featured_topics", default_top_period: "all", mailinglist_mirror: false, minimum_required_tags: 0, navigate_to_first_post_after_read: false, search_priority: 0, allow_global_tags: false, reviewable_by_group_id: nil, required_tag_group_id: nil, min_tags_from_required_group: 1>
Traceback (most recent call last):
当社の開発者がスクリプトを試しましたが、あまり進められませんでした。コンサルティングの形で、この作業を引き受けていただける方はいらっしゃいますか?
はい、PM を送ってください。
お恥ずかしいのですが、PM(プライベートメッセージ)の送信方法がわかりません。見つけられませんでした。また、直接メールでも結構です。abboud at cedrus dot com までご連絡ください。
インポートに関するご質問:当社の vBulletin ベースのフォーラムには、同じフォーラム内の他の投稿へのリンクが含まれる投稿があります。これらはインポート時に変換されますか?もし変換されない場合、どうなるのでしょうか?削除されてしまうのでしょうか?
現在のバージョンがそれらを再書き込みするかどうかは覚えていません。私が持っているスクリプト(PR を提出する予定のもの)はそれらを修正します。


