You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| blobTypes | An array of predefined enum values. | The current release supports `blockBlob` and `appendBlob`. Only delete is supported for `appendBlob`, set tier isn't supported. | Yes |
141
-
| prefixMatch | An array of strings for prefixes to be matched. Each rule can define up to 10 case-sensitive prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under `https://myaccount.blob.core.windows.net/sample-container/blob1/...` for a rule, the prefixMatch is `sample-container/blob1`. | If you don't define prefixMatch, the rule applies to all blobs within the storage account. | No |
141
+
| prefixMatch | An array of strings for prefixes to be matched. Each rule can define up to 10 case-sensitive prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under `https://myaccount.blob.core.windows.net/sample-container/blob1/...` for a rule, the prefixMatch is `sample-container/blob1`.<br /><br />To match the blob name exactly, include the trailing forward slash ('/'), *e.g.*, `sample-container/blob1/`. To match the name pattern, omit the trailing forward slash, *e.g.*, `sample-container/blob1`.| If you don't define prefixMatch, the rule applies to all blobs within the storage account. | No |
142
142
| blobIndexMatch | An array of dictionary values consisting of blob index tag key and value conditions to be matched. Each rule can define up to 10 blob index tag condition. For example, if you want to match all blobs with `Project = Contoso` under `https://myaccount.blob.core.windows.net/` for a rule, the blobIndexMatch is `{"name": "Project","op": "==","value": "Contoso"}`. | If you don't define blobIndexMatch, the rule applies to all blobs within the storage account. | No |
143
143
144
144
To learn more about the blob index feature together with known issues and limitations, see [Manage and find data on Azure Blob Storage with blob index](storage-manage-find-blobs.md).
Copy file name to clipboardExpand all lines: articles/storage/blobs/object-replication-overview.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: normesta
6
6
7
7
ms.service: storage
8
8
ms.topic: conceptual
9
-
ms.date: 08/09/2022
9
+
ms.date: 01/25/2023
10
10
ms.author: normesta
11
11
ms.subservice: blobs
12
12
ms.custom: devx-track-azurepowershell
@@ -55,6 +55,8 @@ Object replication asynchronously copies block blobs in a container according to
55
55
56
56
Object replication requires that blob versioning is enabled on both the source and destination accounts. When a replicated blob in the source account is modified, a new version of the blob is created in the source account that reflects the previous state of the blob, before modification. The current version in the source account reflects the most recent updates. Both the current version and any previous versions are replicated to the destination account. For more information about how write operations affect blob versions, see [Versioning on write operations](versioning-overview.md#versioning-on-write-operations).
57
57
58
+
If your storage account has object replication policies in effect, you cannot disable blob versioning for that account. You must delete any object replication policies on the account before disabling blob versioning.
59
+
58
60
### Deleting a blob in the source account
59
61
60
62
When a blob in the source account is deleted, the current version of the blob becomes a previous version, and there's no longer a current version. All existing previous versions of the blob are preserved. This state is replicated to the destination account. For more information about how to delete operations affect blob versions, see [Versioning on delete operations](versioning-overview.md#versioning-on-delete-operations).
Copy file name to clipboardExpand all lines: articles/storage/blobs/versioning-enable.md
+62-3Lines changed: 62 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: normesta
7
7
8
8
ms.service: storage
9
9
ms.topic: how-to
10
-
ms.date: 06/07/2021
10
+
ms.date: 01/25/2023
11
11
ms.author: normesta
12
12
ms.subservice: blobs
13
13
ms.custom: devx-track-azurepowershell
@@ -21,6 +21,8 @@ This article shows how to enable or disable blob versioning for the storage acco
21
21
22
22
## Enable blob versioning
23
23
24
+
You can enable blob versioning with the Azure portal, PowerShell, Azure CLI, or an Azure Resource Manager template.
25
+
24
26
# [Azure portal](#tab/portal)
25
27
26
28
To enable blob versioning for a storage account in the Azure portal:
@@ -29,7 +31,7 @@ To enable blob versioning for a storage account in the Azure portal:
29
31
1. Under **Blob service**, choose **Data protection**.
30
32
1. In the **Versioning** section, select **Enabled**.
31
33
32
-
:::image type="content" source="media/versioning-enable/portal-enable-versioning.png" alt-text="Screenshot showing how to enable blob versioning in Azure portal":::
34
+
:::image type="content" source="media/versioning-enable/portal-enable-versioning.png" alt-text="Screenshot showing how to enable blob versioning in Azure portal":::
33
35
34
36
# [PowerShell](#tab/powershell)
35
37
@@ -91,6 +93,63 @@ For more information about deploying resources with templates in the Azure porta
91
93
92
94
---
93
95
96
+
## List blob versions
97
+
98
+
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.
99
+
100
+
# [Azure portal](#tab/portal)
101
+
102
+
To list a blob's versions in the Azure portal:
103
+
104
+
1. Navigate to your storage account in the portal, then navigate to the container that contains your blob.
105
+
1. Select the blob for which you want to list versions.
106
+
1. Select the **Versions** tab to display the blob's versions.
107
+
108
+
:::image type="content" source="media/versioning-enable/portal-list-blob-versions.png" alt-text="Screenshot showing how to list blob versions in the Azure portal":::
109
+
110
+
# [PowerShell](#tab/powershell)
111
+
112
+
To list a blob's versions with PowerShell, call the [Get-AzStorageBlob](/powershell/module/az.storage/get-azstorageblob) command with the `-IncludeVersion` parameter:
To list a blob's versions with Azure CLI, call the [az storage blob directory list](/cli/azure/storage/blob/directory#az-storage-blob-directory-list) command with the `--include v` parameter:
132
+
133
+
```azurecli
134
+
storageAccount="<storage-account>"
135
+
containerName="<container-name>"
136
+
137
+
az storage blob list \
138
+
--container-name $containerName \
139
+
--prefix "ab" \
140
+
--query "[[].name, [].versionId]" \
141
+
--account-name $storageAccount \
142
+
--include v \
143
+
--auth-mode login \
144
+
--output tsv
145
+
```
146
+
147
+
# [Template](#tab/template)
148
+
149
+
N/A
150
+
151
+
---
152
+
94
153
## Modify a blob to trigger a new version
95
154
96
155
The following code example shows how to trigger the creation of a new version with the Azure Storage client library for .NET, version [12.5.1](https://www.nuget.org/packages/Azure.Storage.Blobs/12.5.1) or later. Before running this example, make sure you have enabled versioning for your storage account.
@@ -99,7 +158,7 @@ The example creates a block blob, and then updates the blob's metadata. Updating
To list blob versions or snapshots with the .NET v12 client library, specify the [BlobStates](/dotnet/api/azure.storage.blobs.models.blobstates) parameter with the **Version** field.
Copy file name to clipboardExpand all lines: articles/storage/blobs/versioning-overview.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: normesta
7
7
8
8
ms.service: storage
9
9
ms.topic: conceptual
10
-
ms.date: 01/20/2023
10
+
ms.date: 01/25/2023
11
11
ms.author: normesta
12
12
ms.subservice: blobs
13
13
ms.custom: devx-track-azurepowershell
@@ -122,6 +122,8 @@ After versioning is disabled, modifying the current version creates a blob that
122
122
123
123
You can read or delete versions using the version ID after versioning is disabled. You can also list a blob's versions after versioning is disabled.
124
124
125
+
Object replication relies on blob versioning. Before you can disable blob versioning, you must delete any object replication policies on the account. For more information about object replication, see [Object replication for block blobs](object-replication-overview.md).
126
+
125
127
The following diagram shows how modifying a blob after versioning is disabled creates a blob that is not versioned. Any existing versions associated with the blob persist.
126
128
127
129
:::image type="content" source="media/versioning-overview/modify-base-blob-versioning-disabled.png" alt-text="Diagram showing that modification of a current version after versioning is disabled creates a blob that is not a version.":::
0 commit comments