Azure Blob Storage archiving blobs and retention

Azure Blob Storage archiving blobs and retention

Azure blob storage allows you to store the unstructured data. This data can be accessed on REST from all over the world. The data in cloud application may grow at very higher rates.

You may want to manage the storage costs, by categorizing the data as either frequently access data or less frequently accessed data or planned retention time of the data.

This article shows you how you can use these characteristics of data and therefore organize your data in different access tiers to optimize the storage costs.

The Access Tiers

There are three different access tiers:

  • Hot tier
  • Cool tier
  • Archive tier

Let’s have a look at what they means and how the tier can be set on the data objects.

The Hot Tier

The hot tier has high storage costs, and low access costs. You may want to use hot access tiers, for storing the data which requires frequent access. This tier may also be useful for data which is being used for some processing and after processing is done, the data can be moved to the cool tier.

The hot access tier can be set at storage account level and blob level as well.

The Cool Tier

The cool tier has low storage costs and high access costs. – as compared to the hot access tier. This tier is intended for data that will remain in cool tier for at least 30 days. This access tier can be used for short term backups or older media contents which are not viewed very frequently.

The cool access tier can be set at storage account level and blob level as well.

The Archive Tier

The archive tier has lowest storage cost , but it has higher data retrieval cost as compared to hot and cool tiers. The data retrieval may take upto cetain hours. The data should remain in archive tier for at lest 180 days.

When the blob is in archive tier, it cannot be updated, or copied or read. However the metadata of blob is available online – so you can list the blobs and its properties. For blobs in archive, the only valid operations are GetBlobProperties, GetBlobMetadata, ListBlobs, SetBlobTier, and DeleteBlob.

This type of storage may be useful for long term backups scenarios. For compliance adherence, sometimes the data may be required to be stored for longer time, but it is hardly accessed in that duration. For this type of data, Archive tier is great option.

The Archive tier can be enabled only on blobs, it cannot be enabled on the account level.

Access Tiers: Blob vs Account Level

The access tier can be set either on storage account level or on the blob level. Because of this, blobs which have all three access tiers can coexist in the same storage account.

If the access tier comes from the account, you see the Access Tier Inferred blob property set to “true”, and the Access Tier blob property matches the account tier. In the Azure portal, the access tier inferred property is displayed with the blob access tier as Hot (inferred) or Cool (inferred).

You can set the blob level access tier by calling a single operation Set Blob Tier. You can easily change the access tier of a blob among the hot, cool, or archive tiers as usage patterns change, without having to move data between accounts.

All tier changes happen immediately. However, rehydrating a blob from archive can take several hours. The time of the last blob tier change is exposed via the Access Tier Change Time blob property.

Billing Implications

When a blob is moved to a cooler tier (hot->cool, hot->archive, or cool->archive), the operation is billed as a write operation to the destination tier, where the write operation (per 10,000) and data write (per GB) charges of the destination tier apply.

When a blob is moved to a warmer tier (archive->cool, archive->hot, or cool->hot), the operation is billed as a read from the source tier, where the read operation (per 10,000) and data retrieval (per GB) charges of the source tier apply.

Demo: Using Azure Portal

Login to Azure Portal and navigate to the storage account.

On the left side navigation menu, select containers under the blob service group. Then select the sample container which has a file in it. It will open blob properties as shown in below snapshot.

Below panel will open when you click on Change Tier menu option from the blob properties panel. Here you can change the access tier for the individual blob and click on save.

Demo: Using Storage Explorer

You can also use storage explorer to change the access tier. You can change the access tier of the storage account in storage explorer, by right click on the storage account and then selecting Set Default Access Tier.

Set default access tier will open a new dialog where you can set or change the default access tier of already created account.

I hope this article has helped you to understand access tiers and how to set them using portal and storage explorer. Let me know your thoughts.

Leave a Reply