Public preview for Azure Archive Blob Storage and Blob-Level Tiering

Azure Archive Blob Storage is in public preview now. I had the chance to be part of the private preview and to test the new storage tier for some weeks. Learn in this blog post what you can use Azure Archive Blob Storage for and how to automate changing the access tier.

Howdy folks,

summer break is over and it’s time to prepare for Microsoft Ignite 2017. Who will be there? Unfortunately, I cannot attend this year’s conference but nevertheless I wish you all the best of learning, networking and having fun in Orlando this fall. You’re not sure what to put into your schedule? Read my 2016 Ignite blog post here.

In the meantime I had the chance to be part of the private preview of Azure Archive Blob Storage and Blob-Level Tiering and test things out. Last week, Kumail Hussain announced public preview for those new work items so now it’s your turn! In Kumail’s blog post you learn what it takes to be enrolled in the public preview.

Archive Blob Storage is a low cost, highly available and secure cloud storage option for archive workloads thus workloads that don’t need to be accessible all the time but that need to be stored over long time periods and that are infrequently accessed, e.g. for compliance purposes. Currently, there is no pricing available yet but regularly come back and check Azure Storage Pricing website for pricing details.

Edit 2017-09-11: Azure Archive Blob Storage preview pricing for US EAST 2 datacenter region is available on the Azure Storage Pricing website as well as in Azure Pricing Calculator.

Edit 2017-09-22: Azure PowerShell currently does not support the SetBlobTier() method I mention below. Support will be added in the next Azure PowerShell release that is supposed to come soon.

Edit 2017-09-26: Microsoft yesterday released Azure PowerShell 4.4.0 which includes an upgrade to Azure Storage Client Library 8.4.0. Azure Storage Client Library 8.4.0 includes support for getting and setting the tier on a block blob. Bad news is that the preview method .setBlobTier() was changed to .setStandardBlobTier(). I’ve changed the script snippet at the end of this post accordingly. You can install Azure PowerShell 4.4.0 by running the following code in an elevated PowerShell session:

install-module Azure -requiredVersion 4.4.0

During preview, there are some limitations that are supposed to be dissolved before GA. Azure Archive Blob Storage is currently only available in US EAST 2 datacenter region and only LRS Storage Accounts are supported at the moment but it’s planned to support GRS and RA-GRS Storage Accounts once Azure Archive Blob Storage will be GA.

Now what type of data should you put onto Azure Archive Blob Storage? I’m working with a customer who has tons of historical backup tapes for long-term retention that are suffering from their age. Furthermore, tapes demand some administrative overhead for example for operating, restore or copy operations. Azure Archive Blob Storage offers a cost-efficient way for storing those data. So once Archive Blob Storage reaches GA I’m going to move those workloads there.

In my demo subscription I have a blob storage account that has been enabled for Azure Archive Blob Storage. There I have created a container and put some blobs in it.

Test container with blobs
Test container with blobs

As you can see there is a column named Access Tier. Default tier means that the storage account setting is applied to the blob. If you have a look at the blob’s properties you’ll find an option to change the access tier from Default to Hot, Cool or Archive.

Change access tier
Change access Tier

If you select Archive you are informed that you cannot access the tier after saving. In order to make the blob accessible again you need to rehydrate it back to cool or hot access tier.

Setting the Access Tier to Archive
Setting the Access Tier to Archive

Blob-Level Tiering in this context means that you change the access tier per blob and not per container or storage account. Sounds good? Well, in the scenario I sketched above where I want to put Terrabytes of archive data to Azure Storage this might become a really bad job using Azure Portal. Good enough that Microsoft implemented some features that allow to alter blobs by REST API, .Net or PowerShell.

With the following example PowerShell code you can check a blob’s access tier state. Make sure to use the latest Azure PowerShell module:

#Import Azure PowerShell module
Import-Module Azure

#Login to your Azure Account
Login-AzureRmAccount

#Storage Account information
$StorageAccount = "[Enter your Storage Account name here]"
$StorageAccountKey = "[Enter your Storage Account key here]"
$containername = "[Enter your container name here]"
$blobname = "[Enter your blob name here]"

#Create a storage context
$context = New-AzureStorageContext -StorageAccountName $StorageAccount -StorageAccountKey $StorageAccountKey
$blob = Get-AzureStorageBlob -Container $containerName -Blob $blobName -Context $context

#Use the .Net client library API to view blob properties
$blob.ICloudBlob.Properties

As you can see below you find information on access tier and rehydration status using the .Net client library API via PowerShell.

031_getBlobProperties
Get blob properties using .Net client library

The status PendingToCool means that I have started the rehydration process back from Archive tier to Cool tier.

Looking at all properties and methods of the .ICloudBlob object gives you an insight in what you can do with a blob, containing 137 (!) methods:

$blob.ICloudBlob | Get-Member

Knowing that and having a look at all the methods you will find a method called “SetStandardBlobTier()” you can use for changing the access tier.

So, all you need to do is:

  1. Create a Blob Storage Account with cool access tier as default (during preview only in US EAST 2 datacenter region!)
  2. Create one or more containers on that storage account
  3. Copy your files (blobs) to the containers
  4. change the access tier for all blobs from cool to archive

You can change the access tier for all blobs within a container using the following code snippet:

#Account information
$StorageAccount = "[Enter your Storage Account name here]"
$StorageAccountKey = "[Enter your Storage Account key here]"
$containername = "[Enter your container name here]"

#Create a storage context
$context = New-AzureStorageContext -StorageAccountName $StorageAccount -StorageAccountKey $StorageAccountKey
$blobs = Get-AzureStorageBlob -Container $containerName -Context $context

#Change the access tier
Foreach ($blob in $blobs) {
$blob.ICloudBlob.SetStandardBlobTier("Archive")
}

That’s it. Give it a try and check if the solution fits yor needs.

Stay tuned and bye for now,
Tom

Author: Tom Janetscheck

Cloud Security Enthusiast | Security Advocate

11 thoughts on “Public preview for Azure Archive Blob Storage and Blob-Level Tiering”

    1. Hi Jack,
      Thanks for you question. Have you installed the latest Azure PowerShell modules? And have you requested preview access for your subscription following Kumail’s blog post?

      If it’s not working within the loop try to change the access tier for only one blob:

      $blob.ICloudBlob.SetBlobTier(“Archive”)

      Best,
      Thomas

      Like

      1. Hey Thomas, thanks for getting back to me.

        I believe I have the latest version installed(see output below). I have preview access and have setup a storage account where I have uploaded data and set it manually to tier level “archive” via blob properties in the GUI. When I run the above command I see the same error as before regarding the method.

        PS C:\WINDOWS\system32> Get-Module AzureRM -list | Select-Object Name,Version,Path
        Name Version Path
        —- ——- —-
        AzureRM 4.3.1 C:\Program Files\WindowsPowerShell\Modules\AzureRM\4.3.1\AzureRM.psd1
        AzureRM 1.2.0 C:\Program Files\WindowsPowerShell\Modules\AzureRM\1.2.0\AzureRM.psd1

        Like

      2. Hey Jack,

        I’ve just talked to Microsoft and they have confirmed your experience: The SetBlobTier() method still is missing in the current release for Azure PowerShell; I’m using a preview version. SetBlobTier will be supported in the next version of Azure PowerShell which is supposed to be released soon.

        As soon as I can share an ETA I’m going to come back to you.

        Again, thank you for your input.

        Best,
        Tom

        Like

      3. Hey Jack,
        Microsoft yesterday released Azure PowerShell 4.4.0 which includes an upgrade to Azure Storage Client Library 8.4.0. Azure Storage Client Library 8.4.0 includes support for getting and setting the tier on a block blob for blob storage accounts. I’ve change the blog post accordingly.

        You can get Azure PowerShell 4.4.0 by running the following command in an elevated PowerShell session:

        install-module azure -requiredVersion 4.4.0

        Please be aware of the fact that they changed the method from .setBlobTier() to .setStandardBlobTier().

        Happy testing,
        Tom

        Like

    1. Hi Jack,
      currently there is no public pricing information available yet that covers your question so I can’t answer it right now. But stay tuned, I’m sure you will get the information as soon as Archive Storage is GA.

      Like

  1. Hey Guys, So what am I missing here?

    I installed Install-Module Azure -RequiredVersion 4.4.0
    Import-Module Azure -RequiredVersion 4.4.0

    It is then unable to find Add-AzureRmAccount

    So I assume there is a typo and I’m supposed to be installing

    Install-Module AzureRM-RequiredVersion 4.4.0
    Import-Module AzureRM -RequiredVersion 4.4.0

    When I call SetStandardBlobTier I get:

    Method invocation failed because Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob] does not contain a method named ‘SetStandardBlobTier’.

    At line:1 char:1
    + $blob.ICloudBlob.SetStandardBlobTier(“Archive”)

    Could someone please point me in the right direction?

    Like

Leave a Reply to Thomas Janetscheck Cancel reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: