为 blob 启用软删除Enable soft delete for blobs

Blob 软删除会在系统中将已删除的数据保留指定的一段时间,可以在意外删除或覆盖单个 Blob 及其版本、快照和元数据时提供保护。Blob soft delete protects an individual blob and its versions, snapshots, and metadata from accidental deletes or overwrites by maintaining the deleted data in the system for a specified period of time. 在保留期内,可以将 Blob 还原到它在删除时的状态。During the retention period, you can restore the blob to its state at deletion. 在指定的保留期已过后,Blob 将永久被删除。After the retention period has expired, the blob is permanently deleted. 有关 Blob 软删除的详细信息,请参阅 Blob 的软删除For more information about blob soft delete, see Soft delete for blobs.

Blob 软删除是针对 Blob 数据的综合性数据保护策略的一部分。Blob soft delete is part of a comprehensive data protection strategy for blob data. 若要详细了解 Azure 的数据保护建议,请参阅数据保护概述To learn more about Azure's recommendations for data protection, see Data protection overview.

启用 blob 软删除Enable blob soft delete

新存储帐户默认禁用 blob 软删除。Blob soft delete is disabled by default for a new storage account. 你可以使用 Azure 门户、PowerShell 或 Azure CLI 随时启用或禁用存储帐户的软删除。You can enable or disable soft delete for a storage account at any time by using the Azure portal, PowerShell, or Azure CLI.

若要使用 Azure 门户为存储帐户启用 blob 软删除,请执行以下步骤:To enable blob soft delete for your storage account by using the Azure portal, follow these steps:

  1. Azure 门户中导航到存储帐户。In the Azure portal, navigate to your storage account.
  2. 在“Blob 服务”下,找到“数据保护”选项 。Locate the Data Protection option under Blob service.
  3. 在“恢复”部分,选择“启用 blob 软删除” 。In the Recovery section, select Turn on soft delete for blobs.
  4. 指定一个 1 到 365 天的保持期。Specify a retention period between 1 and 365 days. 建议最短保持期为七天。We recommend a minimum retention period of seven days.
  5. 保存所做更改。Save your changes.

显示如何在 Azure 门户中启用软删除的屏幕截图

后续步骤Next steps