Rake migrate_to_s3 errors

So I tested the waters migrating a smaller Discourse forum to s3 successfully. I’m having issues migrating this larger forum however. I might end up resorting to using this method shared by @marcozambi Migrate_to_s3 task fails for placing too many requests, would rather not take the off-road path if possible though. :desert:

Anyone experience this before or have any ideas for solutions? Errors are below:

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
1 Like

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

Sorry for the late reply! Unfortunately no, I didn’t find a solution so I ended up getting a larger server instead. I definitely would like to make the migration though. Did you have any luck?


That particular problem should be solved in the latest beta. The rake task migrates uploads to the new schema if it hasn’t happened yet.