Enable and manage blob versioning

You can enable Blob storage versioning to automatically maintain previous versions of a blob when it is modified or deleted. When blob versioning is enabled, then you can restore an earlier version of a blob to recover your data if it is erroneously modified or deleted.

This article shows how to enable or disable blob versioning for the storage account by using the Azure portal or an Azure Resource Manager template. To learn more about blob versioning, see Blob versioning.

Enable blob versioning

You can enable blob versioning with the Azure portal, PowerShell, Azure CLI, or an Azure Resource Manager template.

To enable blob versioning for a storage account in the Azure portal:

  1. Navigate to your storage account in the portal.

  2. Under Blob service, choose Data protection.

  3. In the Versioning section, select Enabled.

    Screenshot showing how to enable blob versioning in Azure portal

List blob versions

To display a blob's versions, use the Azure portal, PowerShell, or Azure CLI. You can also list a blob's versions using one of the Blob Storage SDKs.

To list a blob's versions in the Azure portal:

  1. Navigate to your storage account in the portal, then navigate to the container that contains your blob.

  2. Select the blob for which you want to list versions.

  3. Select the Versions tab to display the blob's versions.

    Screenshot showing how to list blob versions in the Azure portal

  4. Toggle the Show deleted versions button to display soft-deleted versions. If blob soft delete is enabled for the storage account, then any soft-deleted versions that are still within the soft-delete retention interval will appear in the list.

    Screenshot showing how to list soft-deleted versions in Azure portal.

Next steps