Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to List Azure Blobs Where Last Modified Date > Some Date

Is it possible to List all blobs on a container where Last Modified Date is greater than a specified date.

I have a container with millions of blobs and want to copy those blobs to a backup container, however don't want to loop through all blobs checking each for Last Modified Date.

like image 661
Mike U Avatar asked Jun 27 '17 10:06

Mike U


People also ask

What does List_blobs return?

The List Blobs operation returns a list of the blobs under the specified container.

Can you query Azure blob storage?

You can also call Query Blob Contents to query the contents of a version or snapshot.

How do I sort files in Azure Blob Storage?

Go to the storage account, click "Storage Explorer (preview)" on the left menu, and click on "Last Modified" to sort.


1 Answers

Is it possible to List all blobs on a container where Last Modified Date is greater than a specified date.

As of today it is not possible to do so. Blob service does not provide querying capabilities. When you list the blobs, Blob service will return you a list sorted by blob's name.

Not now, but going forward if you need this capability you may want to organize blobs by dates by prefixing their names with year, month and date. Then you can ask blob service to return you blobs names of which start with a particular prefix. If you use Azure App Service, do take a look at how diagnostics data for an Azure App Service is stored in a blob container. It does prefixing by year, month and date.

like image 126
Gaurav Mantri Avatar answered Nov 03 '22 21:11

Gaurav Mantri