استخدم سكريبت استيراد يتطلب MySQL

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.

إعجاب واحد (1)

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.

إعجاب واحد (1)

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!

إعجاب واحد (1)

Glad you’re making headway!

شكراً لهذا الدليل الواضح، لقد كان مفتاحاً لفهمي لعملية الاستيراد بدلاً من مجرد نسخ ولصق الأوامر بشكل أعمى.

ما زلت أحاول معرفة أسرع طريقة لـ استيراد منتدى دروبال كبير جداً، وما زلت أشعر أن الأمور يمكن تحسينها في حالتي لتقليل وقت التوقف عن العمل عندما أقوم بتشغيل الهجرة النهائية للمنتدى الإنتاجي. قد أكون كبيرًا في السن بعض الشيء، لكنني لست مقتنعًا تمامًا بنموذج Docker/الحاويات. أنا متأكد من أنني قرأت في مكان ما أن هناك خطأ في Docker في مرحلة ما كان يسبب أداءً أبطأ بشكل كبير لخوادم MySQL المعبأة في حاويات. في منتدى Docker، أرى هذا التقرير، لكنني لست متأكدًا مما إذا كان لا يزال ذا صلة. أيضًا، قد لا يكون ذا صلة في حالتي لأنني أستخدم Debian بدلاً من Ubuntu على المضيف.

قد يكون خيار آخر هو تثبيت MySQL أو MariaDB على نظام التشغيل المضيف خارج الحاوية؟

ودون الخوض في التفاصيل، ماذا عن تحسين my.cnf ببعض الاقتراحات من MySQLTuner؟ التكوين القياسي لـ Docker الذي يعمل عبر جميع الحالات لا يمكن أن يكون الأمثل مع مثيلات تجمع المخزن المؤقت وأحجام المخزن المؤقت للمفاتيح، والتي تحدث فرقًا كبيرًا في قاعدة بيانات إنتاجية مخصصة.

مرحباً. شكراً لك على هذا الحل. لقد كنت أواجه مشاكل في الجواهر (gems) كما ذكرت في مقالتك، لذا أتطلع حقًا إلى جعل هذا يعمل. هل تعمل هذه الطريقة على ترحيل منتدى Wordpress bbpress (مستضاف على DreamPress) إلى مثيل Discourse (مستضاف على Digital Ocean)؟

أنا أستخدم قطرة (droplet) Ubuntu من Digital Ocean والطرفية/وحدة التحكم عبر الويب. سؤالي الأول هو ما المتوقع حدوثه عند تشغيل /var/discourse/launcher stop app و /var/discourse/launcher rebuild import؟ هل من المفترض أن تغلق الطرفية/وحدة التحكم عبر الويب؟ لقد حاولت القيام بذلك ولكن يبدو أن ملف import.yml لا يتم حفظه. يعود إلى حالته الافتراضية.

أيضًا، هل يمكن لأحد أن يوضح ما إذا كنت بحاجة إلى تشغيل الخطوة الاختيارية 2 في إعدادي؟

شكراً جزيلاً مقدماً.

ملاحظة: أنا منفتح على دفع المال لشخص ما للقيام بذلك، لكن ميزانيتي محدودة بـ 200 دولار.

ربما ترغب في نشر ذلك في قسم Marketplace.

إعجاب واحد (1)