To read a blob that is in the Archive tier, you must first rehydrate the blob to an online tier (Hot or Cool) tier. You can rehydrate a blob in one of two ways:
By copying it to a new blob in the Hot or Cool tier with the Copy Blob operation. Microsoft recommends this option for most scenarios.
By changing its tier from Archive to Hot or Cool with the Set Blob Tier operation.
When you rehydrate a blob, you can specify the priority for the operation to either standard priority or high priority. A standard-priority rehydration operation may take up to 15 hours to complete. A high-priority operation is prioritized over standard-priority requests and may complete in less than one hour for objects under 10 GB in size. You can change the rehydration priority from Standard to High while the operation is pending.
You can configure Azure Event Grid to fire an event when rehydration is complete and run application code in response. To learn how to handle an event that runs an Azure Function when the blob rehydration operation is complete, see Run an Azure Function in response to a blob rehydration event.
To rehydrate a blob from the Archive tier by copying it to an online tier, use PowerShell, Azure CLI, or one of the Azure Storage client libraries. Keep in mind that when you copy an archived blob to an online tier, the source and destination blobs must have different names.
Copying an archived blob to an online destination tier is supported within the same storage account. Beginning with service version 2021-02-12, you can copy an archived blob to a different storage account, as long as the destination account is in the same region as the source account.
After the copy operation is complete, the destination blob appears in the Archive tier. The destination blob is then rehydrated to the online tier that you specified in the copy operation. When the destination blob is fully rehydrated, it becomes available in the new online tier.
Rehydrate a blob to the same storage account
The following examples show how to copy an archived blob to a blob in the Hot tier in the same storage account.
To copy an archived blob to an online tier with PowerShell, call the Start-AzStorageBlobCopy command and specify the target tier and the rehydration priority. Remember to replace placeholders in angle brackets with your own values:
# Initialize these variables with your values.
$rgName = "<resource-group>"
$accountName = "<storage-account>"
$srcContainerName = "<source-container>"
$destContainerName = "<dest-container>"
$srcBlobName = "<source-blob>"
$destBlobName = "<dest-blob>"
# Get the storage account context
$ctx = (Get-AzStorageAccount `
-ResourceGroupName $rgName `
-Name $accountName).Context
# Copy the source blob to a new destination blob in Hot tier with Standard priority.
Start-AzStorageBlobCopy -SrcContainer $srcContainerName `
-SrcBlob $srcBlobName `
-DestContainer $destContainerName `
-DestBlob $destBlobName `
-StandardBlobTier Hot `
-RehydratePriority Standard `
-Context $ctx
To copy an archived blob to an online tier with Azure CLI, call the az storage blob copy start command and specify the target tier and the rehydration priority. Remember to replace placeholders in angle brackets with your own values:
az storage blob copy start \
--source-container <source-container> \
--source-blob <source-blob> \
--destination-container <dest-container> \
--destination-blob <dest-blob> \
--account-name <storage-account> \
--tier hot \
--rehydrate-priority standard \
--auth-mode login
Rehydrate a blob to a different storage account in the same region
The following examples show how to copy an archived blob to a blob in the Hot tier in a different storage account.
To copy an archived blob to a blob in an online tier in a different storage account with PowerShell, make sure you have installed the Az.Storage module, version 4.4.0 or higher. Next, call the Start-AzStorageBlobCopy command and specify the target online tier and the rehydration priority. You must specify a shared access signature (SAS) with read permissions for the archived source blob.
The following example shows how to copy an archived blob to the Hot tier in a different storage account. Remember to replace placeholders in angle brackets with your own values:
$rgName = "<resource-group>"
$srcAccount = "<source-account>"
$destAccount = "<dest-account>"
$srcContainer = "<source-container>"
$destContainer = "<dest-container>"
$srcBlob = "<source-blob>"
$destBlob = "<destination-blob>"
# Get the destination account context
$destCtx = New-AzStorageContext -StorageAccountName $destAccount -UseConnectedAccount
# Get the source account context
$srcCtx = New-AzStorageContext -StorageAccountName $srcAccount -UseConnectedAccount
# Get the SAS URI for the source blob
$srcBlobUri = New-AzStorageBlobSASToken -Container $srcContainer `
-Blob $srcBlob `
-Permission rwd `
-ExpiryTime (Get-Date).AddDays(1) `
-FullUri `
-Context $srcCtx
# Start the cross-account copy operation
Start-AzStorageBlobCopy -AbsoluteUri $srcBlobUri `
-DestContainer $destContainer `
-DestBlob $destBlob `
-DestContext $destCtx `
-StandardBlobTier Hot `
-RehydratePriority Standard
To copy an archived blob to a blob in an online tier in a different storage account with the Azure CLI, make sure you have installed version 2.35.0 or higher. Next, call the az storage blob copy start command and specify the target online tier and the rehydration priority. You must specify a shared access signature (SAS) with read permissions for the archived source blob.
The following example shows how to copy an archived blob to the Hot tier in a different storage account. Remember to replace placeholders in angle brackets with your own values:
# Specify the expiry interval
end=`date -u -d "1 day" '+%Y-%m-%dT%H:%MZ'`
# Get a SAS for the source blob
srcBlobUri=$(az storage blob generate-sas \
--account-name <source-account> \
--container <source-container> \
--name <archived-source-blob> \
--permissions rwd \
--expiry $end \
--https-only \
--full-uri \
--as-user \
--auth-mode login | tr -d '"')
# Copy to the destination blob in the Hot tier
az storage blob copy start \
--source-uri $srcBlobUri \
--account-name <dest-account> \
--destination-container <dest-container> \
--destination-blob <dest-blob> \
--tier Hot \
--rehydrate-priority Standard \
--auth-mode login
Rehydrate a blob by changing its tier
To rehydrate a blob by changing its tier from Archive to Hot or Cool, use the Azure portal, PowerShell, or Azure CLI.
To change a blob's tier from Archive to Hot or Cool in the Azure portal, follow these steps:
Locate the blob to rehydrate in the Azure portal.
Select the More button on the right side of the page.
Select Change tier.
Select the target access tier from the Access tier dropdown.
From the Rehydrate priority dropdown, select the desired rehydration priority. Keep in mind that setting the rehydration priority to High typically results in a faster rehydration, but also incurs a greater cost.
Select the Save button.
To change a blob's tier from Archive to Hot or Cool with PowerShell, use the blob's BlobClient property to return a .NET reference to the blob, then call the SetAccessTier method on that reference. Remember to replace placeholders in angle brackets with your own values:
# Initialize these variables with your values.
$rgName = "<resource-group>"
$accountName = "<storage-account>"
$containerName = "<container>"
$blobName = "<archived-blob>"
# Get the storage account context
$ctx = (Get-AzStorageAccount `
-ResourceGroupName $rgName `
-Name $accountName).Context
# Change the blob's access tier to Hot with Standard priority.
$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
$blob.BlobClient.SetAccessTier("Hot", $null, "Standard")
To change a blob's tier from Archive to Hot or Cool with Azure CLI, call the az storage blob set-tier command. Remember to replace placeholders in angle brackets with your own values:
az storage blob set-tier \
--account-name <storage-account> \
--container-name <container> \
--name <archived-blob> \
--tier Hot \
--rehydrate-priority Standard \
--auth-mode login
Bulk rehydrate a set of blobs
To rehydrate a large number of blobs at one time, call the Blob Batch operation to call Set Blob Tier as a bulk operation. For a code example that shows how to perform the batch operation, see AzBulkSetBlobTier.
Check the status of a rehydration operation
While the blob is rehydrating, you can check its status and rehydration priority using the Azure portal, PowerShell, or Azure CLI. The status property may return rehydrate-pending-to-hot or rehydrate-pending-to-cool, depending on the target tier for the rehydration operation. The rehydration priority property returns either Standard or High.
Keep in mind that rehydration of an archived blob may take up to 15 hours, and repeatedly polling the blob's status to determine whether rehydration is complete is inefficient. Using Azure Event Grid to capture the event that fires when rehydration is complete offers better performance and cost optimization. To learn how to run an Azure Function when an event fires on blob rehydration, see Run an Azure Function in response to a blob rehydration event.
To check the status and priority of a pending rehydration operation in the Azure portal, display the Change tier dialog for the blob:
When the rehydration is complete, you can see in the Azure portal that the fully rehydrated blob now appears in the targeted online tier.
To check the status and priority of a pending rehydration operation with PowerShell, call the Get-AzStorageBlob command, and check the ArchiveStatus and RehydratePriority properties of the blob. If the rehydration is a copy operation, check these properties on the destination blob. Remember to replace placeholders in angle brackets with your own values:
To check the status and priority of a pending rehydration operation with Azure CLI, call the az storage blob show command, and check the rehydrationStatus and rehydratePriority properties of the destination blob. Remember to replace placeholders in angle brackets with your own values:
Change the rehydration priority of a pending operation
While a standard-priority rehydration operation is pending, you can change the rehydration priority setting for a blob from Standard to High to rehydrate that blob more quickly.
Note that the rehydration priority setting cannot be lowered from High to Standard for a pending operation. Also keep in mind that changing the rehydration priority may have a billing impact. For more information, see Blob rehydration from the Archive tier.
Change the rehydration priority for a pending Set Blob Tier operation
To change the rehydration priority while a standard-priority Set Blob Tier operation is pending, use the Azure portal, PowerShell, Azure CLI, or one of the Azure Storage client libraries.
To change the rehydration priority for a pending operation with the Azure portal, follow these steps:
Navigate to the blob for which you want to change the rehydration priority, and select the blob.
Select the Change tier button.
In the Change tier dialog, set the access tier to the target online access tier for the rehydrating blob (Hot or Cool). The Archive status field shows the target online tier.
In the Rehydrate priority dropdown, set the priority to High.
Select Save.
To change the rehydration priority for a pending operation with PowerShell, make sure that you have installed the Az.Storage module, version 3.12.0 or later. Next, get the blob's properties from the service. This step is necessary to ensure that you have an object with the most recent property settings. Finally, use the blob's BlobClient property to return a .NET reference to the blob, then call the SetAccessTier method on that reference.
# Get the blob from the service.
$rehydratingBlob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
# Verify that the current rehydration priority is Standard.
if ($rehydratingBlob.BlobProperties.RehydratePriority -eq "Standard")
{
# Change rehydration priority to High, using the same target tier.
if ($rehydratingBlob.BlobProperties.ArchiveStatus -eq "rehydrate-pending-to-hot")
{
$rehydratingBlob.BlobClient.SetAccessTier("Hot", $null, "High")
"Changing rehydration priority to High for blob moving to Hot tier."
}
if ($rehydratingBlob.BlobProperties.ArchiveStatus -eq "rehydrate-pending-to-cool")
{
$rehydratingBlob.BlobClient.SetAccessTier("Cool", $null, "High")
"Changing rehydration priority to High for blob moving to Cool tier."
}
}
To change the rehydration priority for a pending operation with Azure CLI, first make sure that you have installed the Azure CLI, version 2.29.2 or later. For more information about installing the Azure CLI, see How to install the Azure CLI.
Next, call the az storage blob set-tier command with the --rehydrate-priority parameter set to High. The target tier (Hot or Cool) must be the same tier that you originally specified for the rehydration operation. Remember to replace placeholders in angle brackets with your own values:
# Update the rehydration priority for a blob moving to the Hot tier.
az storage blob set-tier \
--account-name <storage-account> \
--container-name <container> \
--name <blob> \
--tier Hot \
--rehydrate-priority High \
--auth-mode login
# Show the updated property values.
az storage blob show \
--account-name <storage-account> \
--container-name <container> \
--name <blob> \
--query '[rehydratePriority, properties.rehydrationStatus]' \
--output tsv \
--auth-mode login
Change the rehydration priority for a pending Copy Blob operation
When you rehydrate a blob by copying the archived blob to an online tier, Azure Storage immediately creates the destination blob in the Archive tier. The destination blob is then rehydrated to the target tier with the priority specified on the copy operation. For more information on rehydrating an archived blob with a copy operation, see Copy an archived blob to an online tier.
To perform the copy operation from the Archive tier to an online tier with Standard priority, use PowerShell, Azure CLI, or one of the Azure Storage client libraries. For more information, see Rehydrate a blob with a copy operation. Next, to change the rehydration priority from Standard to High for the pending rehydration, call Set Blob Tier on the destination blob and specify the target tier.
After you have initiated the copy operation, you'll see in the Azure portal that both the source and destination blob are in the Archive tier. The destination blob is rehydrating with Standard priority.
To change the rehydration priority for the destination blob, follow these steps:
Select the destination blob.
Select the Change tier button.
In the Change tier dialog, set the access tier to the target online access tier for the rehydrating blob (Hot or Cool). The Archive status field shows the target online tier.
In the Rehydrate priority dropdown, set the priority to High.
Select Save.
The destination blob's properties page now shows that it is rehydrating with High priority.
After you have initiated the copy operation, check the properties of the destination blob. You'll see that the destination blob is in the Archive tier and is rehydrating with Standard priority.
# Initialize these variables with your values.
$rgName = "<resource-group>"
$accountName = "<storage-account>"
$destContainerName = "<container>"
$destBlobName = "<destination-blob>"
# Get the storage account context
$ctx = (Get-AzStorageAccount `
-ResourceGroupName $rgName `
-Name $accountName).Context
# Get properties for the destination blob.
$destinationBlob = Get-AzStorageBlob -Container $destContainerName `
-Blob $destBlobName `
-Context $ctx
$destinationBlob.BlobProperties.AccessTier
$destinationBlob.BlobProperties.ArchiveStatus
$destinationBlob.BlobProperties.RehydratePriority
Next, call the SetAccessTier method via PowerShell to change the rehydration priority for the destination blob to High, as described in Change the rehydration priority for a pending Set Blob Tier operation. The target tier (Hot or Cool) must be the same tier that you originally specified for the rehydration operation. Check the properties again to verify that the blob is now rehydrating with High priority.
After you have initiated the copy operation, check the properties of the destination blob. You'll see that the destination blob is in the Archive tier and is rehydrating with Standard priority.
Next, call the az storage blob set-tier command with the --rehydrate-priority parameter set to High, as described in Change the rehydration priority for a pending Set Blob Tier operation. The target tier (Hot or Cool) must be the same tier that you originally specified for the rehydration operation. Check the properties again to verify that the blob is now rehydrating with High priority.