因此,我成功测试了将较小的 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)