Content in bucket deleted after db update

After updating my db, I had a profile-pictures bucket, and it ALL uploads were erased. This isn't a huge issue for now, but wondering if anyone has any tips for updating.
14 Replies
garyaustin
garyaustin3w ago
What do you mean my updating db? Is this on Supabase hosted? Just doing an infrastructure upgrade would not change the storage.objects table (metadata) or the actual s3 file data.
𝙢𝙖𝙨𝙤𝙣
Postgres version, service update. the bucket wasen't deleted, the content was.
garyaustin
garyaustin3w ago
This would not delete any tables, rows in tables or s3 data.
No description
𝙢𝙖𝙨𝙤𝙣
That's what I clicked. Maybe a me issue. Just curious what is the recommended way to update? Every available, major .# releases?
garyaustin
garyaustin3w ago
Check the status of your instance on the home page upper right. And your files where in the Storage UI and are now not?
𝙢𝙖𝙨𝙤𝙣
Says eveyrthing is fine.
garyaustin
garyaustin3w ago
I would certainly update frequently when in development and before launching production. Then I would only update if I needed to for some bug or over some longer time spam just to keep current. But normally I would have a dev instance at least to test first. If you go to the storage UI for your bucket you are missing files?
𝙢𝙖𝙨𝙤𝙣
Yep.
garyaustin
garyaustin3w ago
Never heard of this before. Did you run any sort of migrations or do you have an AI with write access?
𝙢𝙖𝙨𝙤𝙣
I use MCP with Cursor, but monitor every change. I definitely need to start making changes in dev before production db. I haven't figured how to do that yet.
garyaustin
garyaustin3w ago
I'll do an upgrade to the current release just to make sure there is not a bug. Are your other tables' data there? It also implies your storage.buckets table is fine if the bucket is still there. Seems odd to only have one table wiped. Maybe check the Table UI for storage.objects and see if there are in rows with filenames in that.
𝙢𝙖𝙨𝙤𝙣
And other bucket had content after too. So odd. Thanks for your help 😄
garyaustin
garyaustin3w ago
Then that makes no sense from an infra point of view. It would not know one bucket from another in storage.objects table. They are all intermixed. So something would have had to delete particular rows by bucket id. It is like you ran an empty bucket command from the API or UI. I don't know if the storage logs would track that or not. Did you do a DB restore from back up at some point to before these files existed? Would have been in past 7 days and you would need to be Pro or do you own backups for that. That could update the storage.objects table back to before those files existed.
𝙢𝙖𝙨𝙤𝙣
I have backed up but never restored. I just did an update to test and they did carry over. Idk.

Did you find this page helpful?