Table of Contents
Blob lifecycle management in Azure allows users to automate the transition of blob data to a cooler storage tier or to delete blobs at the end of their lifecycle. This function is vital for Azure Administrators, especially when preparing for the AZ-104 Microsoft Azure Administrator exam, which tests the ability to manage Azure resources effectively, including storage solutions.
Azure Blob storage lifecycle management offers a rich, rule-based policy for GPv2 (General Purpose version 2) and Blob storage accounts. Rules created for Azure Blob storage accounts can move or delete data at the end of its lifecycle.
To configure blob lifecycle management policies, you must first log in to the Azure Portal and navigate to your storage account.
When adding a rule, you need to specify a rule name and the scope at which the rule applies, such as the entire account, a specific container, or a subset of blobs identified by a prefix.
Rules can perform two types of actions:
Here’s an example of a rule for tiering and another for deletion:
Tiering Example
{
“rules”: [
{
“name”: “moveToCoolStorage”,
“enabled”: true,
“type”: “Lifecycle”,
“definition”: {
“filters”: {
“prefixMatch”: [“container1/prefix1”],
“blobTypes”: [“blockBlob”]
},
“actions”: {
“baseBlob”: {
“tierToCool”: {“daysAfterModificationGreaterThan”: 30}
}
}
}
}
]
}
Deletion Example
{
“rules”: [
{
“name”: “deleteOldBlobs”,
“enabled”: true,
“type”: “Lifecycle”,
“definition”: {
“filters”: {
“prefixMatch”: [“container2/prefix2”],
“blobTypes”: [“blockBlob”]
},
“actions”: {
“baseBlob”: {
“delete”: {“daysAfterModificationGreaterThan”: 365}
}
}
}
}
]
}
Review the rule details and save the policy. The Azure portal provides a policy editor to input the rules or you can upload a policy in JSON format.
By setting up lifecycle management policies for your blobs, you ensure that your data is stored cost-effectively while remaining compliant with data retention policies. For Azure Administrators preparing for the AZ-104 exam, understanding how to configure and manage these policies is essential for efficient and effective Azure storage management.
Answer: True
Explanation: Azure Blob lifecycle management policies can be applied to block blobs in both the standard and premium performance tiers.
Answer: Both moving blobs to a cooler storage tier and deleting old blobs
Explanation: Azure Blob lifecycle management policies can automate the transition of blobs to a cooler storage tier and can also automate the deletion of old blobs that are no longer needed.
Answer: False
Explanation: Implementing Azure Blob lifecycle management policies is optional and up to the administrator’s discretion based on the organization’s data retention requirements.
Answer: Block blobs and append blobs.
Explanation: As of the knowledge cutoff in 2023, Azure Blob lifecycle management supports block blobs and append blobs, but not page blobs.
Answer: False
Explanation: Lifecycle management policies can be scoped at the level of a storage account, a container, or even a subset of blobs within a container using prefixes.
Answer: Storage account, container, and blob level
Explanation: Azure Blob lifecycle management rules can be set at the storage account level, the container level, and even to a specified set of blobs within a container using prefixes.
Answer: False
Explanation: Azure Blob lifecycle management policies don’t have a minimum number of days before you can transition a blob to a cooler storage tier. The policy timing can be customized based on the user’s needs.
Answer: Daily
Explanation: Azure Blob lifecycle management policies are executed on a daily basis by Azure, automatically performing the specified actions within the rules.
Answer: Yes, it can archive blobs to the Archive storage tier
Explanation: Azure Blob lifecycle management policies can be used to transition blobs automatically to the Archive storage tier to save costs on rarely accessed data.
Answer: False
Explanation: Once a blob is deleted via a lifecycle management policy, it cannot be recovered unless it is protected with soft delete or versioning features which are separate settings that must be enabled.
Answer: Any of the above methods
Explanation: Lifecycle management policies can be defined and managed using Azure PowerShell, Azure CLI, or through the Azure Portal.
Answer: False
Explanation: There are no additional costs directly associated with the execution of lifecycle management policies. However, there might be transaction costs or data transfer costs as a result of the actions defined within those policies.
If this material is helpful, please leave a comment and support us to continue.