大家好,
我正在尝试将我的 Discourse 论坛迁移到一个位于上海的新服务器,但遇到了一个无法解决的问题,非常希望能得到你们的帮助。
到目前为止,我已经完成了以下操作:
-
代码克隆: 我使用 Git 在新服务器上克隆了 Discourse 仓库。
-
配置文件:
- 我在
/var/discourse/container目录下创建了一个新的app.yml文件。 - 我将旧服务器上的
app.yml文件内容复制并粘贴到了新服务器上的新app.yml文件中。
- 我在
-
备份文件: 我手动将旧服务器上的备份文件上传到了新服务器的备份文件夹中。
-
运行诊断: 我执行了
./discourse-doctor命令来检查和修复配置。
然而,当我运行 ./discourse-doctor 时,我收到了以下错误:
FAILED
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate’failed with return #<Process::Status: pid 1835 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn’
exec failed with the params {“cd”=>“$home”, “tag”=>“migrate”, “hook”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
b2af39f0849bd60c3ce1b9f1ebe1c33a47fcea20edce2233171da420d4730323
附加信息:
- 备份方法: 使用 Discourse 的内置备份功能导出了一个
tar.gz文件。
我不确定导致 db:migrate 错误的原因以及如何进行。谁能提供关于此错误可能原因的见解,并建议解决步骤?此外,任何关于迁移 Discourse 论坛的技巧或常见陷阱都将非常感激!
非常感谢您的帮助!