Forum Discussion
Manage/restore metadata when blob is updated
I'm using an Azure Storage container of block blobs as a data source for an Azure AI Search Index, and I'm using Blob metadata key value pairs for some custom data.
But metadata gets wiped when a blob is updated. How are folks managing that?
For reference, I've got a CosmosDB set up also for now with a cross-reference I can restore from, but it's manual. I considered using Cosmos as my data source instead, but I also need a place to store/serve media files from related to these records.
1 Reply
Blob metadata in Azure Storage is overwritten whenever you upload or replace a blob. It does not persist automatically across updates. To manage this, you need to either re-apply metadata after each update or maintain metadata in an external store (Cosmos DB, SQL, Table Storage) and sync it back. People may also use a hybrid approach: blobs for media, external DB for metadata, and automation (functions, event grid, pipelines) to restore metadata after updates.