Urgent: Images in my Supabase bucket keep disappearing

Hi everyone, I really need urgent help. Some of the images in my Supabase bucket are becoming unavailable over time, even though they used to exist and were accessible before. For example, if you try to open this image with it correspondent link: auto_1758564051113_4du0qiky8bh.jpeg You get this error: {"statusCode":"404","error":"Not found","message":"The resource was not found"} This file was there before, and now it has completely disappeared from storage. I am on the Pro plan and I’m paying for Supabase to serve my clients, not just for myself. This situation is costing me money and damaging trust with my customers. Has anyone seen this behavior before? Could this be an issue with Storage objects becoming out of sync with S3? Is there any way to recover or prevent files from disappearing like this? I would be very grateful if an admin or someone from the Supabase team could escalate this, because this is an urgent production issue for me. 👉 Important note: The images are still physically present in the bucket (I can see them listed in the dashboard, with correct file size and metadata), but I cannot open them or download them anymore. It’s very strange. Thanks in advance!
No description
46 Replies
garyaustin
garyaustin6d ago
Never heard of random files disappearing. Supabase would not have anything running to make storage api calls or delete from storage.objects with SQL (which would be bad as that orphans file anyway). Do you allow deletes with RLS? This is a user helping user forum and not monitored by Supabase regularly. Note just saw your additional info.
Simon Fredes
Simon FredesOP6d ago
Yes, I do allow deleting, but I’m not using it. Also, the images are not actually being deleted — they remain in the bucket. You can see in the screenshot: the image is still there, with its file size and identifier. It physically exists, but it is completely inaccessible.
garyaustin
garyaustin6d ago
I see that now, for some reason only saw the top half of your post while answering. Did you restore your DB at some point, or move it from one instance to another? The s3 data is "connected" to your storage.objects by name only. There is no actual reference pointer or anything. Do you ever move or change the filename with SQL?
Simon Fredes
Simon FredesOP6d ago
No, I didn’t. The only thing I did was about a week ago when I restored a backup. I had an issue with the Supabase interface: when I tried to move images inside the bucket into a folder, those images all got renamed with the same name, which caused them to become inaccessible. After doing the backup restore, they went back to their original names, but those affected images are now, little by little, disappearing and becoming inaccessible.
garyaustin
garyaustin6d ago
Did we talk then?
Simon Fredes
Simon FredesOP6d ago
yes i think so
garyaustin
garyaustin6d ago
So your instance for sure was messed up by what you did. The files you restored in the back up that got renamed are gone. Did you get hold of support? They might "slowly" be disappearing because of caching. But what you did with the restore would leave any files that got renamed without real data.
Simon Fredes
Simon FredesOP6d ago
they talk me today and: Hey there, Thanks for contacting Supabase support and apologies for the delay in responses as we continue to work on increased volume of support requests. Unfortunately, we do not have automated backups of storage objects. This means we have no way to help you restore the storage s3 bucket to a state before the issues sadly. As you realized in your messages, the database restore would have restored the storage schema tables which would now be out of sync with the actual S3 buckets. This is not a known issue and I am not able to reproduce it on my end so far. I am going to share this with the Storage team to see if we can identify what caused the issues and what remediation options we have to help you here. Best Regards, Peter Lyn Supabase Support This is not a known issue
garyaustin
garyaustin6d ago
Yes, that is my belief as far as your files. You caused them to be lost with the restore as far as their old names. What caused your original renaming issue I can't say and you have no logs from then to debug it. I've never heard of that before and that is what they are saying is not a know issue.
Simon Fredes
Simon FredesOP6d ago
its weird bc i can watch the images at my website, where thoose are upload, so, i think ill try to download them and upload again?
garyaustin
garyaustin6d ago
If you still have them cached then absolutely do that.
Simon Fredes
Simon FredesOP6d ago
look
Simon Fredes
Simon FredesOP6d ago
AutoBahia
Venta de autos nuevos y usados en Bahia Blanca
Simon Fredes
Simon FredesOP6d ago
Look at the Ford Fiesta "Ver mas" look the first image, right click and "copy image adress", then if u try to paste clipboard on a new tab you will see the image but doing the same with the second image 404 not found
garyaustin
garyaustin6d ago
All the files you renamed are likely gone. The names you restored might work for awhile because of caching but will go away eventually. And from the UI would all be gone as it does not cache. Not sure what I'm looking at there.
No description
Simon Fredes
Simon FredesOP6d ago
No description
Simon Fredes
Simon FredesOP6d ago
you should see this
garyaustin
garyaustin6d ago
Right. You probably do because you looked at it before it was lost and it is cached for you.
Simon Fredes
Simon FredesOP6d ago
so you cant see any picture?
garyaustin
garyaustin6d ago
Not that one. I do on some of the others.
Simon Fredes
Simon FredesOP6d ago
its extremly weird all the images i tried to move that got renamed by the SAME NAME just disappeared
garyaustin
garyaustin6d ago
I've tried to explain to you they got renamed on s3 to whatever the new name was. When you restored you put back the old names. That does not match the names on s3. A database restore only restores storage.objects.
Simon Fredes
Simon FredesOP6d ago
yup so its fked up
garyaustin
garyaustin6d ago
Yes. If you have them cached you could fix them. You should never restore storage.objects if there have been deletes or renames.
garyaustin
garyaustin6d ago
404
Simon Fredes
Simon FredesOP6d ago
omg I laugh so I don't cry hahaha
garyaustin
garyaustin6d ago
If you can see the images you can download and reupload. But when your cache expires they will be gone. Your calls are not going to Supabase.
Simon Fredes
Simon FredesOP6d ago
Gary thank you for being polite and explain it to me It's weird because I never tried to rename it, I just tried, from the supabase interface, to move the images to a different folder. BUT THEY GOT ALL RENAMED I don't understand the connection between moving and renaming.
garyaustin
garyaustin6d ago
That is what might have been figured out or fixed, but when you restored you lost all that.
Simon Fredes
Simon FredesOP6d ago
Yes, I understand, but when all the images were renamed, my client's website didn't have any images, and if he noticed, he wouldn't be happy.
garyaustin
garyaustin6d ago
It is a big weakness in backup/restores that it is only metadata and not file data. When a file is deleted or renamed (moved) it can't be restored from backup. Just saying it might have been possible to rename them back.
Simon Fredes
Simon FredesOP6d ago
I was desperate, and when I downloaded the backup I saw that the images weren't in the storage, but their old names were, and I had no better idea than to restore that.
garyaustin
garyaustin6d ago
Yes. It makes sense. And the results make sense (at least to me). What originally happened with the move is unknown and impossible to figure out now.
Simon Fredes
Simon FredesOP6d ago
i have another website, and the images of the other website are good, because this images didn't get renamed
garyaustin
garyaustin6d ago
If you upload with upsert the same names it will fix the issue. Slow, but if you have the images....
Simon Fredes
Simon FredesOP6d ago
i tried to move around 80 images, so my weekend is fked up yep, ill delete the old images and upload the new ones now, the new images will upload automatically to a new folder i created
Simon Fredes
Simon FredesOP6d ago
No description
Simon Fredes
Simon FredesOP6d ago
is it on cache too? because u got a 404 but i can see the image
garyaustin
garyaustin6d ago
I don't know what you mean.
Simon Fredes
Simon FredesOP6d ago
you tried to open this link: https://phkfepkeinrpdhlkhmhy.supabase.co/storage/v1/object/public/autos-images/auto_1758068064931_oymg055u9pq.JPG and you got a 404 but i can see the image why i can and you cant? sorry for my english, im from argentina haha
garyaustin
garyaustin6d ago
Yes most likely you looked at it before the problem and you computer has it cached. You could try a different device that has not looked at it and it probably won't be there. There is also a CDN that caches. That could be regional also. So it might cache for your region but not for mine. Do you know how long you set caching for?
Simon Fredes
Simon FredesOP6d ago
Yes! Because from a friend's cell phone, the images can be seen (entering for the first time), so they are cached by region (Latam). I'll tell you something interesting: I tried downloading the images from the bucket the other day, but ONLY the images that weren't renamed were downloaded; the rest gave an error. So, it's just a matter of time before they're all deleted. Now I will try to communicate well with Supabase support center to describe the error as much as possible so they can solve it. Because it wasn't my mistake, but rather a mistake from Supabase.
garyaustin
garyaustin6d ago
If they get an error in the bucket (the storage UI) they are gone. If they work now they should keep working It is "only" the files you renamed. All of those unless cached are gone. Eventually they won't be cached.
Simon Fredes
Simon FredesOP6d ago
okay I'm glad I found the error and that I'm still in time to fix it. Thanks again for being kind and patient with me. you are the man

Did you find this page helpful?