The discussion revolves around issues with S3 migrations from/to Minio. hosna initially reported two problems: migration from local to Minio resulted in broken links, and migration from Minio to local only transferred images, not other file types.
rishabh confirmed that the issue was due to a bug and that the rake tasks were only modified for DigitalOcean Spaces and AWS S3. tgxworld later fixed the bug in the uploads:migrate_to_s3 rake task.
However, hosna still encountered issues with migration, including incorrect URLs and broken links. rishabh suggested checking the s3_endpoint setting in Site Settings, and tgxworld pointed out that the URL for upload records was incorrect.
Despite attempts to fix the issue, hosna reported that the problem persisted, and rishabh explained that the Minio setup is currently broken and that plans are in place to pull the s3_force_path_style setting to support Minio-style URLs.
zogstrip suggested running a command to identify uploads that need to be migrated and recommended deleting records that are no longer in use. hosna reported that there were many such records and asked for guidance on how to proceed.
The discussion concludes with hosna acknowledging that there is still an issue with the URLs and considering tgxworld’s suggestion to restore from a recent backup and try the migration script again.
This is indeed a bug and I will look into it this week, the rake tasks were actually never modified for Minio so I’ll start with doing that. As of now, the rake tasks only work with DigitalOcean Spaces and AWS S3.
I’m not sure what the issue is but have you entered your s3_endpoint as https://m.example.com or just m.example.com in Site Settings?
If this is the problem then we need to improve the help text for that field.
Yes it is. @tgxworld if you are still looking into this, the one thing different about this Minio setup is that the force_path_style setting is true. I don’t see how this can make the https:// go away
This bug is still not fixed. And It got even worse.
First, I thought maybe I just don’t need to migrate local data and discourse would read them from local disk even If I enable s3 uploads. However, after one day, I realized that my local files, except for images, won’t be loaded (mp3, mp4 etc).
So I decided to migrate the files anyway and then change all strings starting with my minio endpoint by adding https:// , as the problem I mentioned here :
However, migration reports something like /original/1X/dd758eae1e79c7a2b844d571da9c67ca1df02d39.mp3 does not exist locally
for all files, Although I checked the path and the file exist. (at least this migration was correct two months ago!)
so I desperately disabled s3 and rebaked all post. However, discourse still doesn’t load local files. I still am sure that the file exists there. So now all of my upload links are broken.
@tgxworld did a major update recently to uploads.rake. So maybe those commits broke it.
Do you know if that is the only file name with a space in it? It seems if spaces in file names had the potential to cause a problem it would have come up before, but maybe not?