Hello, We have hit a similar problem to this in our environment as well, we were hoping to get a hand to resolve it too.
Our problem is similar to this one in many ways:
- We have the same value listed under
s3 upload bucketands3 backup bucket - We hit this problem when we upgraded Discourse:
Old version: v2.3.0.beta3
New Version: v2.5.0.beta6
- I have exec into the discourse container and queried the database:
SELECT id,url FROM uploads where id > 0 and url not like '//acme-forum.s3.dualstack.us-west-2.amazonaws.com/original/%';
id | url
----+----------------------------------------------------------------------------------------------------
1 | /uploads/default/original/1X/eb17xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc33.png
2 | /uploads/default/original/1X/b87fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxv21.png
78 | //acme-forum.s3-us-west-2.amazonaws.com/original/1X/1205xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxv045.png
(3 rows)
- I have exec into the discourse container and queried the database:
select url from uploads where url like '//acme-forum.s3.dualstack.us-west-2.amazonaws.com/original/3X/%';
//acme-forum.s3.dualstack.us-west-2.amazonaws.com/original/3X/6/2/6267xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf607c.jpeg
(7953 rows)
- I have checked how many itms are in ./original/3X/, the answer is
251items
Question:
- we’re using
dualstackand I don’t want to re-map our urls to not use it. - our folder structure looks different, we have things like
3X/X/Y(eg:3X/7/a) so how can we move everything fromdefaultto3X/*, it will still not map correctly
My current thinking is to write a script that will reference the output from Step 4 to find out where to move the file back into the ./original/3X/X/Y folder.
The only problem is that when I did that, dualstack has not hosted this file yet. What I mean is, when I replace the file to original/3X/X/Y, I can see it when I go to:
Broken https://acme-forum.s3.dualstack.us-west-2.amazonaws.com/original/3X/6/b/6b6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa001.png
Update it turns out the dualstack endpoint was never broken like I thought, I made a mistake when I originally copied the image file into ./original/3X/6/b where I forgot to allow read from everyone.
So my question is:
Would it be a viable option for me to put the image files from ./default back to ./original/3X/x/y and then not modify the database at all?