Skip to content

Commit 94424ad

Browse files
committed
add procedures
1 parent 013055b commit 94424ad

File tree

7 files changed

+169
-28
lines changed

7 files changed

+169
-28
lines changed

articles/storage/blobs/access-tiers-online-manage.md

Lines changed: 83 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The default access tier setting for a general-purpose v2 storage account determi
3232

3333
When you change the default access tier setting for an existing general-purpose v2 storage account, the change applies to all blobs in the account for which an access tier has not been explicitly set. Changing the default access tier may have a billing impact. For details, see [Default account access tier setting](access-tiers-overview.md#default-account-access-tier-setting).
3434

35-
#### [Portal](#tab/portal)
35+
#### [Portal](#tab/azure-portal)
3636

3737
To set the default access tier for a storage account at create time in the Azure portal, follow these steps:
3838

@@ -89,7 +89,7 @@ The following sections describe how to specify that a blob is uploaded to either
8989

9090
To create a blob in the Hot or Cool tier tier, specify that tier when you create the blob. The access tier specified on upload overrides the default access tier for the storage account.
9191

92-
### [Azure portal](#tab/portal)
92+
### [Portal](#tab/azure-portal)
9393

9494
To upload a blob or set of blobs to a specific tier from the Azure portal, follow these steps:
9595

@@ -166,7 +166,7 @@ Storage accounts have a default access tier setting that indicates in which onli
166166

167167
A blob that doesn't have an explicitly assigned tier infers its tier from the default account access tier setting. You can determine whether a blob's access tier is inferred by using the Azure portal, PowerShell, or Azure CLI.
168168

169-
#### [Portal](#tab/portal)
169+
#### [Portal](#tab/azure-portal)
170170

171171
If a blob's access tier is inferred from the default account access tier setting, then the Azure portal displays the access tier as **Hot (inferred)** or **Cool (inferred)**.
172172

@@ -214,44 +214,115 @@ az storage blob show \
214214

215215
You can change the tier of an existing blob in one of two ways:
216216

217-
- By calling the [Set Blob Tier](/rest/api/storageservices/set-blob-tier) operation, either directly or via a [lifecycle management](#blob-lifecycle-management) policy, to change the blob's tier.
217+
- By calling the [Set Blob Tier](/rest/api/storageservices/set-blob-tier) operation, either directly or via a [lifecycle management](access-tiers-overview.md#blob-lifecycle-management) policy, to change the blob's tier.
218218
- By calling the [Copy Blob](/rest/api/storageservices/copy-blob) operation to copy a blob from one tier to another. In this case, the source blob remains in the original tier, and a new blob is created in the target tier.
219219

220220
For more information about each of these options, see [Setting or changing a blob's tier](access-tiers-overview.md#setting-or-changing-a-blobs-tier).
221221

222+
Use PowerShell, Azure CLI, or one of the Azure Storage client libraries to move a blob to a different tier.
223+
222224
### Change a blob's tier
223225

224226
When you change a blob's tier, you move that blob and all of its data to the target tier. Calling [Set Blob Tier](/rest/api/storageservices/set-blob-tier) is typically the best option when you are changing a blob's tier from a hotter tier to a cooler one.
225227

226-
# [Portal](#tab/portal)
228+
# [Portal](#tab/azure-portal)
229+
230+
To change a blob's tier from Hot to Cool in the Azure portal, follow these steps:
227231

228-
TBD
232+
1. Navigate to the blob for which you want to change the tier.
233+
1. Select the blob, then select the **Change tier** button.
234+
1. In the **Change tier** dialog, select the target tier.
235+
1. Select the **Save** button.
236+
237+
:::image type="content" source="media/access-tiers-online-manage/change-blob-tier-portal.png" alt-text="Screenshot showing how to change a blob's tier in the Azure portal":::
229238

230239
#### [PowerShell](#tab/azure-powershell)
231240

232-
TBD
241+
To change a blob's tier from Hot to Cool with PowerShell, use the blob's **BlobClient** property to return a .NET reference to the blob, then call the **SetAccessTier** method on that reference. Remember to replace placeholders in angle brackets with your own values:
242+
243+
```azurepowershell
244+
# Initialize these variables with your values.
245+
$rgName = "<resource-group>"
246+
$accountName = "<storage-account>"
247+
$containerName = "<container>"
248+
$blobName = "<blob>"
249+
250+
# Get the storage account context
251+
$ctx = (Get-AzStorageAccount `
252+
-ResourceGroupName $rgName `
253+
-Name $accountName).Context
254+
255+
# Change the blob's access tier to Cool.
256+
$blob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
257+
$blob.BlobClient.SetAccessTier("Cool", $null, "Standard")
258+
```
233259

234260
#### [Azure CLI](#tab/azure-cli)
235261

236-
TBD
262+
To change a blob's tier from Hot to Cool with Azure CLI, call the [az storage blob set-tier](/cli/azure/storage/blob#az_storage_blob_set_tier) command. Remember to replace placeholders in angle brackets with your own values:
263+
264+
```azurecli
265+
az storage blob set-tier \
266+
--account-name <storage-account> \
267+
--container-name <container> \
268+
--name <blob> \
269+
--tier Cool \
270+
--auth-mode login
271+
```
237272

238273
---
239274

240275
### Copy a blob to a different online tier
241276

242-
Calling [Copy Blob](/rest/api/storageservices/copy-blob) is recommended for most scenarios where you are moving a blob from Cool to Hot, or rehydrating a blob from the Archive tier. Use PowerShell, Azure CLI, or one of the Azure Storage client libraries to copy a blob to a different tier.
277+
When you copy a blob to a different tier, you move that blob and all of its data to the target tier. Calling [Copy Blob](/rest/api/storageservices/copy-blob) is recommended for most scenarios where you are moving a blob from Cool to Hot, or rehydrating a blob from the Archive tier.
243278

244-
# [Portal](#tab/portal)
279+
# [Portal](#tab/azure-portal)
245280

246281
N/A
247282

248283
#### [PowerShell](#tab/azure-powershell)
249284

250-
TBD
285+
To copy a blob to from Cool to Hot with PowerShell, call the [Start-AzStorageBlobCopy](/powershell/module/az.storage/start-azstorageblobcopy) command and specify the target tier. Remember to replace placeholders in angle brackets with your own values:
286+
287+
```azurepowershell
288+
# Initialize these variables with your values.
289+
$rgName = "<resource-group>"
290+
$accountName = "<storage-account>"
291+
$srcContainerName = "<source-container>"
292+
$destContainerName = "<dest-container>"
293+
$srcBlobName = "<source-blob>"
294+
$destBlobName = "<dest-blob>"
295+
296+
# Get the storage account context
297+
$ctx = (Get-AzStorageAccount `
298+
-ResourceGroupName $rgName `
299+
-Name $accountName).Context
300+
301+
# Copy the source blob to a new destination blob in Hot tier with Standard priority.
302+
Start-AzStorageBlobCopy -SrcContainer $srcContainerName `
303+
-SrcBlob $srcBlobName `
304+
-DestContainer $destContainerName `
305+
-DestBlob $destBlobName `
306+
-StandardBlobTier Hot `
307+
-Context $ctx
308+
```
251309

252310
#### [Azure CLI](#tab/azure-cli)
253311

254-
TBD
312+
To copy a blob from Cool to Hot with Azure CLI, call the [az storage blob copy start](/cli/azure/storage/blob/copy#az_storage_blob_copy_start) command and specify the target tier. Remember to replace placeholders in angle brackets with your own values:
313+
314+
```azurecli
315+
az storage blob copy start \
316+
--source-container <source-container> \
317+
--source-blob <source-blob> \
318+
--destination-container <dest-container> \
319+
--destination-blob <dest-blob> \
320+
--account-name <storage-account> \
321+
--tier hot \
322+
--auth-mode login
323+
```
324+
325+
---
255326

256327
## Next steps
257328

articles/storage/blobs/archive-blob.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can use the Azure portal, PowerShell, Azure CLI, or one of the Azure Storage
2828

2929
To archive one ore more blobs on upload, create the blob directly in the Archive tier.
3030

31-
### [Azure portal](#tab/portal)
31+
### [Portal](#tab/azure-portal)
3232

3333
To archive a blob or set of blobs on upload from the Azure portal, follow these steps:
3434

@@ -40,7 +40,7 @@ To archive a blob or set of blobs on upload from the Azure portal, follow these
4040

4141
:::image type="content" source="media/archive-blob/upload-blobs-archive-portal.png" alt-text="Screenshot showing how to upload blobs to the archive tier in the Azure portal":::
4242

43-
### [PowerShell](#tab/powershell)
43+
### [PowerShell](#tab/azure-powershell)
4444

4545
To archive a blob or set of blobs on upload with PowerShell, call the [Set-AzStorageBlobContent](/powershell/module/az.storage/set-azstorageblobcontent) command, as shown in the following example. Remember to replace the placeholder values in brackets with your own values:
4646

@@ -112,7 +112,7 @@ Use the **Set Blob Tier** operation to move a blob from the Hot or Cool tier to
112112

113113
The **Set Blob Tier** operation changes the tier of a single blob. To move a set of blobs to the archive tier with optimum performance, Microsoft recommends performing a bulk archive operation. The bulk archive operation sends a batch of **Set Blob Tier** calls to the service in a single transaction. For more information, see [Bulk archive](#bulk-archive).
114114

115-
#### [Portal](#tab/portal)
115+
#### [Portal](#tab/azure-portal)
116116

117117
To move an existing blob to the Archive tier in the Azure portal, follow these steps:
118118

@@ -166,7 +166,7 @@ Use the [Copy Blob](/rest/api/storageservices/copy-blob) operation to copy a blo
166166

167167
A **Copy Blob** operation is best for scenarios where you may need to read or modify the archived data before the early deletion interval has elapsed. You can access the source blob's data without needing to rehydrate the archived blob.
168168

169-
#### [Portal](#tab/portal)
169+
#### [Portal](#tab/azure-portal)
170170

171171
N/A
172172

articles/storage/blobs/archive-rehydrate-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ While a blob is in the Archive access tier, it's considered to be offline and ca
2020

2121
- [Change a blob's access tier to an online tier](#change-a-blobs-access-tier-to-an-online-tier): You can rehydrate an archived blob to the Hot or Cool tier by changing its tier using the [Set Blob Tier](/rest/api/storageservices/set-blob-tier) operation.
2222

23-
Rehydrating a blob from the Archive tier can take several hours to complete. Microsoft recommends rehydrating larger blobs for optimal performance. Rehydrating several small blobs concurrently may require additional time. A maximum of 10 GiB per storage account may be rehydrated per hour (???accurate).
23+
Rehydrating a blob from the Archive tier can take several hours to complete. Microsoft recommends rehydrating larger blobs for optimal performance. Rehydrating several small blobs concurrently may require additional time. A maximum of 10 GiB per storage account may be rehydrated per hour.
2424

2525
You can configure [Azure Event Grid](../../event-grid/overview.md) to raise an event when you rehydrate a blob from the Archive tier to an online tier and to send the event to an event handler. For more information, see [Handle an event on blob rehydration](#handle-an-event-on-blob-rehydration).
2626

0 commit comments

Comments
 (0)