Azure Storage Data Protection Flashcards
Recommendations for basic data protection
If you are looking for basic data protection coverage for your storage account and the data that it contains, then Microsoft recommends taking the following steps to begin with:
- Configure an Azure Resource Manager lock on the storage account to protect the account from deletion or configuration changes. Learn more…
- Enable container soft delete for the storage account to recover a deleted container and its contents. Learn more…
- Save the state of a blob at regular intervals:
- For Blob Storage workloads, enable blob versioning to automatically save the state of your data each time a blob is overwritten. Learn more…
- For Azure Data Lake Storage workloads, take manual snapshots to save the state of your data at a particular point in time. Learn more…
These options, as well as additional data protection options for other scenarios, are described in more detail in the following section.
Data protection by resource type (mention 4)
Data protection by resource type
The following table summarizes the Azure Storage data protection options according to the resources they protect.
Data protection optionProtects an account from deletionProtects a container from deletionProtects an object from deletionProtects an object from overwritesAzure Resource Manager lockYesNo1NoNoImmutability policy on a blob versionYes2Yes3YesYes4Immutability policy on a containerYes5YesYesYesContainer soft deleteNoYesNoNoBlob versioning6NoNoYesYesBlob soft deleteNoNoYesYesPoint-in-time restore6NoNoYesYesBlob snapshotNoNoNoYesRoll-your-own solution for copying data to a second account7NoYesYesYes
1 An Azure Resource Manager lock does not protect a container from deletion.
2 Storage account deletion fails if there is at least one container with version-level immutable storage enabled.
3 Container deletion fails if at least one blob exists in the container, regardless of whether policy is locked or unlocked.
4 Overwriting the contents of the current version of the blob creates a new version. An immutability policy protects a version’s metadata from being overwritten.
5 While a legal hold or a locked time-based retention policy is in effect at container scope, the storage account is also protected from deletion.
6 Not currently supported for Data Lake Storage workloads.
7 AzCopy and Azure Data Factory are options that are supported for both Blob Storage and Data Lake Storage workloads. Object replication is supported for Blob Storage workloads only.
What is Soft Delete for Containers?
Soft delete for containers
Container soft delete protects your data from being accidentally deleted by maintaining the deleted data in the system for a specified period of time. During the retention period, you can restore a soft-deleted container and its contents to the container’s state at the time it was deleted. After the retention period has expired, the container and its contents are permanently deleted.
What are the 3 recommended data protection configurations?
Blob soft delete is part of a comprehensive data protection strategy for blob data. For optimal protection for your blob data, Microsoft recommends enabling all of the following data protection features:
- Container soft delete, to restore a container that has been deleted. To learn how to enable container soft delete, see Enable and manage soft delete for containers.
- Blob versioning, to automatically maintain previous versions of a blob. When blob versioning is enabled, you can restore an earlier version of a blob to recover your data if it’s erroneously modified or deleted. To learn how to enable blob versioning, see Enable and manage blob versioning.
- Blob soft delete, to restore a blob, snapshot, or version that has been deleted. To learn how to enable blob soft delete, see Enable and manage soft delete for blobs.
How does container soft delete works?
When you enable container soft delete, you can specify a retention period for deleted containers that is between 1 and 365 days. The default retention period is seven days. During the retention period, you can recover a deleted container by calling the Restore Container operation.
Difference between Container Soft Delte and Blob Soft Delete
When you restore a container, the container’s blobs and any blob versions and snapshots are also restored. However, you can only use container soft delete to restore blobs if the container itself was deleted. To a restore a deleted blob when its parent container hasn’t been deleted, you must use blob soft delete or blob versioning.
Warning
Container soft delete can restore only whole containers and their contents at the time of deletion. You cannot restore a deleted blob within a container by using container soft delete. Microsoft recommends also enabling blob soft delete and blob versioning to protect individual blobs in a container.
When you restore a container, you must restore it to its original name. If the original name has been used to create a new container, then you will not be able to restore the soft-deleted container.
The following diagram shows how a deleted container can be restored when container soft delete is enabled:
After the retention period has expired, the container is permanently deleted from Azure Storage and can’t be recovered. The clock starts on the retention period at the point that the container is deleted. You can change the retention period at any time, but keep in mind that an updated retention period applies only to newly deleted containers. Previously deleted containers will be permanently deleted based on the retention period that was in effect at the time that the container was deleted.
Disabling container soft delete doesn’t result in permanent deletion of containers that were previously soft-deleted. Any soft-deleted containers will be permanently deleted at the expiration of the retention period that was in effect at the time that the container was deleted.
Container soft delete is available for the following types of storage accounts:
Container soft delete is available for the following types of storage accounts:
- General-purpose v2 and v1 storage accounts
- Block blob storage accounts
- Blob storage accounts
What is Soft delete for blobs?
What is Blob Soft Delete?
Blob soft delete protects an individual blob, snapshot, or version from accidental deletes or overwrites by maintaining the deleted data in the system for a specified period of time. During the retention period, you can restore a soft-deleted object to its state at the time it was deleted. After the retention period has expired, the object is permanently deleted.
Explain briefly how blod soft delete works
How blob soft delete works
When you enable blob soft delete for a storage account, you specify a retention period for deleted objects of between 1 and 365 days. The retention period indicates how long the data remains available after it’s deleted or overwritten. The clock starts on the retention period as soon as an object is deleted or overwritten.
While the retention period is active, you can restore a deleted blob, together with its snapshots, or a deleted version by calling the Undelete Blob operation. The following diagram shows how a deleted object can be restored when blob soft delete is enabled:
You can change the soft delete retention period at any time. An updated retention period applies only to data that was deleted after the retention period was changed. Any data that was deleted before the retention period was changed is subject to the retention period that was in effect when it was deleted.
Attempting to delete a soft-deleted object doesn’t affect its expiry time.
If you disable blob soft delete, you can continue to access and recover soft-deleted objects in your storage account until the soft delete retention period has elapsed.
Blob versioning is available for general-purpose v2, block blob, and Blob storage accounts. Storage accounts with a hierarchical namespace aren’t currently supported.
How are deletions handled when soft delete is enabled?
How deletions are handled when soft delete is enabled
When blob soft delete is enabled, deleting a blob marks that blob as soft-deleted. No snapshot is created. When the retention period expires, the soft-deleted blob is permanently deleted.
If a blob has snapshots, the blob can’t be deleted unless the snapshots are also deleted. When you delete a blob and its snapshots, both the blob and snapshots are marked as soft-deleted. No new snapshots are created.
You can also delete one or more active snapshots without deleting the base blob. In this case, the snapshot is soft-deleted.
If a directory is deleted in an account that has the hierarchical namespace feature enabled on it, the directory and all its contents are marked as soft-deleted. Only the soft-deleted directory can be accessed. In order to access the contents of the soft-deleted directory, the soft-deleted directory needs to be undeleted first.
Soft-deleted objects are invisible unless they’re explicitly displayed or listed. For more information about how to list soft-deleted objects, see Manage and restore soft-deleted blobs.
How are overwrites handled when soft delete is enabled?
How overwrites are handled when soft delete is enabled
Important
This section doesn’t apply to accounts that have a hierarchical namespace.
Calling an operation such as Put Blob, Put Block List, or Copy Blob overwrites the data in a blob. When blob soft delete is enabled, overwriting a blob automatically creates a soft-deleted snapshot of the blob’s state prior to the write operation. When the retention period expires, the soft-deleted snapshot is permanently deleted.
Soft-deleted snapshots are invisible unless soft-deleted objects are explicitly displayed or listed. For more information about how to list soft-deleted objects, see Manage and restore soft-deleted blobs.
To protect a copy operation, blob soft delete must be enabled for the destination storage account.
Blob soft delete doesn’t protect against operations to write blob metadata or properties. No soft-deleted snapshot is created when a blob’s metadata or properties are updated.
Blob soft delete doesn’t afford overwrite protection for blobs in the archive tier. If a blob in the archive tier is overwritten with a new blob in any tier, then the overwritten blob is permanently deleted.
For premium storage accounts, soft-deleted snapshots don’t count toward the per-blob limit of 100 snapshots.
Blob soft delete and versioning, how does it work?
If blob versioning and blob soft delete are both enabled for a storage account, then overwriting a blob automatically creates a new previous version that reflects the blob’s state before the write operation. The new version isn’t soft-deleted and isn’t removed when the soft-delete retention period expires. No soft-deleted snapshots are created.
If blob versioning and blob soft delete are both enabled for a storage account, then when you delete a blob, the current version of the blob becomes a previous version, and there’s no longer a current version. No new version is created and no soft-deleted snapshots are created. All previous versions are retained until they are explicitly deleted, either with a direct delete operation or via a lifecycle management policy.
Enabling soft delete and versioning together protects previous blob versions as well as current versions from deletion. When soft delete is enabled, explicitly deleting a previous version creates a soft-deleted version that is retained until the soft-delete retention period elapses. After the soft-delete retention period has elapsed, the soft-deleted blob version is permanently deleted.
You can use the Undelete Blob operation to restore soft-deleted versions during the soft-delete retention period. The Undelete Blob operation always restores all soft-deleted versions of the blob. It isn’t possible to restore only a single soft-deleted version.
Microsoft recommends enabling both xxx and xxx for your storage accounts for optimal data protection
versioning and blob soft delete
What is Versioning in Storage Data Protection?
Blob versioning
You can enable Blob storage versioning to automatically maintain previous versions of an object. When blob versioning is enabled, you can access earlier versions of a blob to recover your data if it is modified or deleted.