新しいアップロードは Amazon S3 に正常にアップロードされているのですが、以下のコマンドを実行すると、ローカルに保存されている古いファイルを S3 へ移行させることができません。
DISCOURSE_S3_BUCKET="bucketname" DISCOURSE_S3_REGION="ap-south-1" DISCOURSE_S3_ACCESS_KEY_ID="AKIchangedabitUNM2" DISCOURSE_S3_SECRET_ACCESS_KEY="rX6Pf3C_changedabit_YKKtdVrnbw6B" DISCOURSE_S3_CDN_URL="https://bucketname.s3.ap-south-1.amazonaws.com" rake uploads:migrate_to_s3
15 日前まではこのコマンドは完璧に動作していました。
しかし今日、以下のエラーが表示されます。
Checking if default already migrated...
7 of 14 uploads are not migrated to S3. S3 migration failed for db 'default'.
1 posts are not remapped to new S3 upload URL. S3 migration failed for db 'default'.
Looking for missing uploads on: default
0 post uploads are missing.
No posts require rebaking
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)
Rails コンソールでも以下の 2 つのコマンドを実行してみましたが、効果はありませんでした。
SiteSetting.migrate_to_new_scheme = true
Jobs::MigrateUploadScheme.new.execute(nil)
補足:アップロードファイルはバケット bucketname 内のサブフォルダ bucketname/uploads に設定されています。