AZ-104 Microsoft Azure Administrator Exam

You're a great admin... on-prem. Now, become a great admin in the cloud and prove it by passing the Microsoft Certified: Azure Administrator Associate exam!

Practice Test

Exam

Configure soft delete for blobs and containers

Implement Soft Delete for Blobs and Containers

Soft Delete for Containers

Soft delete is a crucial feature in Azure that helps safeguard your data against accidental deletions by allowing you to retain the deleted data for a certain period. This feature can be applied to both blobs and containers in Azure Storage accounts. For containers, soft delete ensures you can restore deleted containers and their contents within a specified retention period. This retention period can vary from 1 to 365 days, with seven days as the default setting.

During the retention period, you have the option to recover a deleted container using the Restore Container operation. It's important to note that once this period is over, the container along with its contents are permanently deleted. Key points to consider when managing soft delete for containers include:

  • Retention Period: This timeframe during which you can recover deleted data can be adjusted according to your needs, ranging from 1 to 365 days.
  • Restoration: Containers can be restored back to the state they were in at the time of deletion.
  • Limitations: While container soft delete is effective, it doesn't allow individual blob restoration within a container. To accomplish that, blob soft delete must be enabled separately.

Soft Delete for Blobs

Blob soft delete offers protection on a more granular level, safeguarding individual blobs, snapshots, or versions from being accidentally deleted or overwritten. Like with containers, the deleted data is retained for a specified duration, allowing you to restore it to its previous state at the time of deletion. The retention period here can also be adjusted anywhere between 1 and 365 days.

Important aspects to keep in mind include:

  • Retention Period: As with containers, this too is configurable within the same duration range of 1 to 365 days.
  • Restoration: The recovery of deleted blobs, snapshots, or versions can be efficiently carried out using the Undelete Blob operation.
  • Cost Considerations: Enabling blob versioning features might incur extra costs due to the creation and storage of new versions following every write operation.

For optimal security and data assurance, Microsoft advocates enabling the following configurations:

  • Container Soft Delete: This ensures recovery capability for deleted containers.
  • Blob Versioning: Automatically maintaining previous versions of blobs enhances data integrity.
  • Blob Soft Delete: Facilitates restoration of deleted blobs, snapshots, or versions, ensuring comprehensive protection.

Enabling Soft Delete

Enabling soft delete in Azure comes with several options that provide flexibility. One can activate this feature using different methods including:

  • Azure Portal: Navigate to your storage account settings, specifically under Data Protection, and toggle on soft delete options.
  • PowerShell: Utilize commands like Enable-AzStorageBlobDeleteRetentionPolicy and Enable-AzStorageContainerDeleteRetentionPolicy for automation.
  • Azure CLI: Execute commands such as az storage account blob-service-properties update for seamless configuration.

Viewing and Restoring Soft-Deleted Data

Within the Azure portal, visibility for soft-deleted containers and blobs is provided by toggling the options like Show deleted containers or Show deleted blobs. To restore any soft-deleted entity, simply use the Undelete option visible in the context menu.

Conclusion

Implementing soft delete for blobs and containers within Azure Storage accounts serves as a vital shield against accidental data losses by allowing structured recovery and enhanced protection procedures. By appropriately configuring retention periods coupled with enabling related features like blob versioning, comprehensive recovery capabilities can be maintained thus ensuring robust data protection framework.