Azure Blob Storage

Ensuring Data Integrity with Immutability

Understanding Blob Immutability

Azure Blob Storage offers robust immutability features to protect your data from accidental or malicious modifications and deletions. This is crucial for compliance, legal holds, and long-term data archiving. Immutability ensures that once data is written, it cannot be changed or deleted for a specified period.

Types of Immutability Policies

Azure Blob Storage supports two primary types of immutability policies:

How Immutability Works

Immutability is applied at the container level. When an immutability policy is enabled on a container, all blobs within that container become subject to the policy's rules.

Key Benefits of Immutability

Implementing Immutability with Azure CLI

You can manage immutability policies using the Azure CLI. Here are some common commands:

Setting a Time-based Retention Policy:

az storage container immutability policy set --account-name  --container-name  --policy-name locked --retention-days 30 --resource-group 
        

Applying a Legal Hold:

az storage blob immutability policy set --account-name  --container-name  --blob  --policy-name locked --resource-group 
        

Removing a Legal Hold:

az storage blob immutability policy delete --account-name  --container-name  --blob  --policy-name locked --resource-group 
        
Note: Once a time-based retention policy is set and locked, it cannot be removed or shortened. Legal holds can be removed, but the data remains protected until they are.

Use Cases for Blob Immutability

By leveraging Azure Blob Storage's immutability features, you can build highly resilient and compliant data storage solutions.

Explore Azure Blob Storage