Is it possible to restore a blob from a previous version that's in the Archive tier?

Andrei Muresan 1 Reputation point
2021-09-21T19:51:36.937+00:00

We've recently started storing our daily backups in Azure Blob Storage and are in the process of adding some lifecycle policies to minimize long-term storage costs. We have Blob Versioning enabled in the storage account and we want to ensure that we'll be able to restore blobs from older versions that are in the Archive tier as expected. From what I understood based on the documentation, the process for restoring a blob from a previous version that's stored in the Archive tier would be:

  1. Rehydrate the previous blob version
  2. Restore the blob from the newly hydrated version

Am I missing anything? I couldn't find any documentation that outlines this exact scenario but I'm reasonably confident that I understand the different parts. Mainly looking for a sanity check, thank you!

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,427 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
931 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 33,296 Reputation points Microsoft Employee
    2021-09-22T16:55:22.893+00:00

    @Andrei Muresan
    Currently the only way to retrieve the data from an archived snapshot or version is to copy that to a new blob. If you attempt to set the tier of archived version to cool or hot you will receive an error. Instructions for rehydrating a blob via copying can be found here. Once you have copied the blob you could proceed to replace the existing blob with this restored version.
    Here is my test for restoring a blob via CLI:

    az storage blob copy start -u https://storageaccount.blob.core.windows.net/test1/blob.txt?versionId=2021-09-21T21:50:52.7602500Z --destination-container test2 --destination-blob blob1.txt --account-name storageaccount --tier hot --rehydrate-priority standard  
      
    There are no credentials provided in your command and environment, we will query for account key for your storage account.  
    It is recommended to provide --connection-string, --account-key or --sas-token in your command as credentials.  
      
    You also can add `--auth-mode login` in your command to use Azure Active Directory (Azure AD) for authorization if your login account is assigned required RBAC roles.  
    For more information about RBAC roles in storage, visit https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli.  
      
    In addition, setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information about environment variable usage.  
    {  
      "client_request_id": "11d491ce-1bc4-11ec-be4c-0a580af407e7",  
      "copy_id": "514e41a1-ad0b-484c-907d-54a765d00718",  
      "copy_status": "success",  
      "date": "2021-09-22T16:42:26+00:00",  
      "etag": "\"0x8D97DE7F6327C09\"",  
      "last_modified": "2021-09-22T16:42:27+00:00",  
      "request_id": "1570842b-501e-0031-78d0-af8fb5000000",  
      "version": "2020-04-08",  
      "version_id": "2021-09-22T16:42:27.1056905Z"  
    }  
    

    Hope this helps! Let me know if you have further questions or run into any issues.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments