You’ll need to modify the script to import the data. The bbpress script imports only posts of a particular type (I likely don’t remember the right wordpress lingo). What kind of WP posts do you want to import? Which are topics and which are posts? Is there something like categories? Those are just a few questions you’ll need to answer by modifying the script. How to do that is beyond the scope of the support you’re likely to get here.
Edit:I’ve retired a few times and gotten closer… Now:
At step 2, mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < /backup/yourbackup.sql i get the error bash: /backups/yourstratapropertywordpress.sql: No such file or directory when it does exist (at least, in /var/backups it does)
If I jump ahead and try su discourse -c "bundle exec ruby script/import_scripts/bbpress.rb" anyway, I get the following result:
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
Traceback (most recent call last):
5: from script/import_scripts/bbpress.rb:512:in `<main>'
4: from script/import_scripts/bbpress.rb:512:in `new'
3: from script/import_scripts/bbpress.rb:21:in `initialize'
2: from script/import_scripts/bbpress.rb:21:in `new'
1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in `connect': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql2::Error::ConnectionError)
Thanks! I will take a look at the DB and the script and see if I can’t accomplish my purposes.
Good luck! I wrote at least a couple importers before I “learned” Ruby. If you have an understanding of SQL that could be acquired in an undergraduate course in the mid 1980s, you can likely pull it off. If you write the queries something such that the field names in the resulting data match what the script expect you might be able to change only the SQL.
@pfaffman I’d really appreciate your help here, I’m very stuck
I’m pretty slammed right now and this likely isn’t solved here. Email Jay@literatecomputing.com with a budget and I’ll do my best to come up with a solution.
This seems like your MySQL server is either not running or is not installed properly.
Success!
The post type should be post and needs to replace post_type topic. Tags were not brought over nor were the topics’ categories. All my posts were imported as an anonymous user, but it is certainly a decent start!
Glad you’re making headway!
この明確なガイドをありがとうございます。コマンドをただ盲目的にコピー&ペーストするのではなく、インポートプロセスを理解する上で非常に役立ちました。
非常に大きなDrupalフォーラムをインポートするための最も速い方法をまだ模索しており、最終的な本番フォーラム移行を実行する際、ダウンタイムを短縮するために最適化できる可能性があるという印象をまだ持っています。私はベテランかもしれませんが、Docker/コンテナ化のパラダイム全体にはまだ完全に納得していません。以前、Dockerのバグが原因で、コンテナ化されたMySQLインスタンスのパフォーマンスが大幅に低下していたとどこかで読んだ記憶があります。Dockerフォーラムではこのレポートを見ていますが、まだ関連性があるかはわかりません。また、ホストでUbuntuではなくDebianを実行しているため、私のケースでは関連性がない可能性もあります。
別の選択肢として、ホストOSにコンテナ外でMySQLまたはMariaDBをインストールすることも考えられますか?
詳細には立ち入らずに、MySQLTunerからの提案でmy.cnfを最適化することについてはどうでしょうか? すべてのインスタンスで機能する標準のDocker構成は、バッファープールインスタンスとキーバッファサイズが、専用の本番DBで大きな違いを生むため、最適ではない可能性があります。
こんにちは。このソリューションをありがとうございます。ご指摘の通り、私もgemの問題を抱えていたので、これがうまくいくことを本当に楽しみにしています。
この方法は、Wordpressのbbpressフォーラム(DreamPressでホストされている)をDiscourseインスタンス(Digital Oceanでホストされている)に移行するのに有効でしょうか?
Digital OceanのUbuntuベースのドロップレットとWebターミナル/コンソールを使用しています。最初の質問は、/var/discourse/launcher stop appと/var/discourse/launcher rebuild importを実行したときに何が起こると予想されるかということです。Webターミナル/コンソールは閉じるべきなのでしょうか?試してみましたが、import.ymlファイルは保存されないようです。デフォルトの状態に戻ってしまいます。
また、オプションのステップ2を実行する必要があるかどうか、誰か教えていただけますか?
前もって感謝いたします。
追伸:誰かに依頼して実行してもらうことも可能ですが、予算は200ドルに限られています。
#marketplaceに投稿してみてはどうでしょうか。