Rake migrate_to_s3 错误

因此,我成功测试了将较小的 Discourse 论坛迁移到 S3 的流程。不过,在迁移这个较大的论坛时遇到了问题。我可能最终不得不采用 @marcozambi 分享的这种方法:Migrate_to_s3 task fails for placing too many requests - #2 by marcozambi

有人之前遇到过这种情况,或者有什么解决方案的想法吗?错误信息如下:

root@server-app:/var/www/discourse# rails c
[1] pry(main)> SiteSetting.migrate_to_new_scheme = true
=> true
[2] pry(main)> Jobs::MigrateUploadScheme.new.execute(nil)
=> nil
[3] pry(main)> exit

root@server-app:/var/www/discourse# rake uploads:migrate_to_s3
Checking if default already migrated...
50389 of 50511 uploads are not migrated to S3. S3 migration failed for db 'default'.
223765 posts are not remapped to new S3 upload URL. S3 migration failed for db 'default'.
Looking for missing uploads on: default

85 post uploads are missing.

82 uploads are missing.
76 of 2757605 posts are affected.

rake posts:missing_uploads identified 76 issues. S3 migration failed for db 'default'.
2693898 posts still require rebaking and will be rebaked during regular job
To speed up migrations of posts we recommend you run 'rake posts:rebake_uncooked_posts'
Migrating uploads to S3 for 'default'...
Some uploads were not migrated to the new scheme. Please run these commands in the rails console

SiteSetting.migrate_to_new_scheme = true
Jobs::MigrateUploadScheme.new.execute(nil)
1 个赞

Did you find the solution to this problem. Same problem being faced by me.
Pls guide.
my topic.

抱歉回复晚了!不幸的是,我没有找到解决方案,所以最后直接升级到了更大的服务器。不过我确实还是想进行迁移。你有找到解决办法吗?

2 个赞

该特定问题应在最新的测试版中得到解决。如果尚未迁移,rake 任务会将上传文件迁移到新架构。

3 个赞