Skip to content

Commit 8fce267

Browse files
Merge pull request #208202 from normesta/lifecycle-management
Content for tug-a-war changes
2 parents 10856d3 + ca5fc86 commit 8fce267

8 files changed

+65
-24
lines changed

articles/storage/blobs/archive-blob.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: normesta
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 07/21/2022
10+
ms.date: 08/24/2022
1111
ms.author: normesta
1212
ms.reviewer: fryu
1313
ms.subservice: blobs
@@ -285,29 +285,57 @@ You can use the Azure portal, PowerShell, Azure CLI, or an Azure Resource Manage
285285
286286
To create a lifecycle management policy to archive blobs in the Azure portal, follow these steps:
287287

288+
#### Step 1: Create the rule and specify the blob type
289+
288290
1. Navigate to your storage account in the portal.
289-
1. Under **Data management**, locate the **Lifecycle management** settings.
290-
1. Select the **Add a rule** button.
291-
1. On the **Details** tab, specify a name for your rule.
292-
1. Specify the rule scope: either **Apply rule to all blobs in your storage account**, or **Limit blobs with filters**.
293-
1. Select the types of blobs for which the rule is to be applied, and specify whether to include blob snapshots or versions.
291+
292+
2. Under **Data management**, locate the **Lifecycle management** settings.
293+
294+
3. Select the **Add a rule** button.
295+
296+
4. On the **Details** tab, specify a name for your rule.
297+
298+
5. Specify the rule scope: either **Apply rule to all blobs in your storage account**, or **Limit blobs with filters**.
299+
300+
6. Select the types of blobs for which the rule is to be applied, and specify whether to include blob snapshots or versions.
294301

295302
:::image type="content" source="media/archive-blob/lifecycle-policy-details-tab-portal.png" alt-text="Screenshot showing how to configure a lifecycle management policy - Details tab.":::
296303

304+
#### Step 2: Add rule conditions
305+
297306
1. Depending on your selections, you can configure rules for base blobs (current versions), previous versions, or blob snapshots. Specify one of two conditions to check for:
298307

299308
- Objects were last modified some number of days ago.
309+
- Objects were created some number of days ago.
300310
- Objects were last accessed some number of days ago.
301311

302312
Only one of these conditions can be applied to move a particular type of object to the Archive tier per rule. For example, if you define an action that archives base blobs if they haven't been modified for 90 days, then you can't also define an action that archives base blobs if they haven't been accessed for 90 days. Similarly, you can define one action per rule with either of these conditions to archive previous versions, and one to archive snapshots.
303313

304-
1. Next, specify the number of days to elapse after the object is modified or accessed.
305-
1. Specify that the object is to be moved to the Archive tier after the interval has elapsed.
314+
8. Next, specify the number of days to elapse after the object is modified or accessed.
315+
316+
9. Specify that the object is to be moved to the Archive tier after the interval has elapsed.
317+
318+
> [!div class="mx-imgBorder"]
319+
> ![Screenshot showing how to configure a lifecycle management policy - Base blob tab.](./media/archive-blob/lifecycle-policy-base-blobs-tab-portal.png)
320+
321+
10. If you chose to limit the blobs affected by the rule with filters, you can specify a filter, either with a blob prefix or blob index match.
322+
323+
#### Step 3: Ensure that the rule excludes rehydrated blobs
324+
325+
If you rehydrate a blob by changing it's tier, this rule will move the blob back to the archive tier if the last modified time, creation time, or last access time is beyond the threshold set for the policy.
326+
327+
If you selected the **Last modified** rule condition, you can prevent this from happening by selecting **Skip blobs that have been rehydrated in the last**, and then entering the number of days you want a rehydrated blob to be excluded from this rule.
328+
329+
> [!div class="mx-imgBorder"]
330+
> ![Screenshot showing the skip blobs that have been rehydrated in the last setting.](./media/archive-blob/lifecycle-policy-base-blobs-tab-portal-exclude-rehydrated-blobs.png)
331+
332+
> [!NOTE]
333+
> This option appears only if you selected the **Last modified** rule condition.
334+
335+
Select the **Add** button to add the rule to the policy.
306336

307-
:::image type="content" source="media/archive-blob/lifecycle-policy-base-blobs-tab-portal.png" alt-text="Screenshot showing how to configure a lifecycle management policy - Base blob tab.":::
308337

309-
1. If you chose to limit the blobs affected by the rule with filters, you can specify a filter, either with a blob prefix or blob index match.
310-
1. Select the **Add** button to add the rule to the policy.
338+
#### View the policy JSON
311339

312340
After you create the lifecycle management policy, you can view the JSON for the policy on the **Lifecycle management** page by switching from **List view** to **Code view**.
313341

@@ -324,7 +352,8 @@ Here's the JSON for the simple lifecycle management policy created in the images
324352
"actions": {
325353
"baseBlob": {
326354
"tierToArchive": {
327-
"daysAfterLastAccessTimeGreaterThan": 90
355+
"daysAfterLastAccessTimeGreaterThan": 90,
356+
"daysAfterLastTierChangeGreaterThan": 7
328357
}
329358
}
330359
},

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: storage
55
author: normesta
66

77
ms.author: normesta
8-
ms.date: 07/26/2022
8+
ms.date: 08/24/2022
99
ms.service: storage
1010
ms.subservice: blobs
1111
ms.topic: conceptual
@@ -52,6 +52,7 @@ You must copy the archived blob to a new blob with a different name or to a diff
5252
Microsoft recommends performing a copy operation in most scenarios where you need to move a blob from the Archive tier to an online tier, for the following reasons:
5353

5454
- A copy operation avoids the early deletion fee that is assessed if you change the tier of a blob from the Archive tier before the required 180-day period elapses. For more information, see [Archive access tier](access-tiers-overview.md#archive-access-tier).
55+
5556
- If there's a lifecycle management policy in effect for the storage account, then rehydrating a blob with [Set Blob Tier](/rest/api/storageservices/set-blob-tier) can result in a scenario where the lifecycle policy moves the blob back to the Archive tier after rehydration because the last modified time is beyond the threshold set for the policy. A copy operation leaves the source blob in the Archive tier and creates a new blob with a different name and a new last modified time, so there's no risk that the rehydrated blob will be moved back to the Archive tier by the lifecycle policy.
5657

5758
Copying a blob from the Archive tier can take hours to complete depending on the rehydration priority selected. Behind the scenes, a blob copy operation reads your archived source blob to create a new online blob in the selected destination tier. The new blob may be visible when you list the blobs in the parent container before the rehydration operation is complete, but its tier will be set to Archive. The data isn't available until the read operation from the source blob in the Archive tier is complete and the blob's contents have been written to the new destination blob in an online tier. The new blob is an independent copy, so modifying or deleting it doesn't affect the source blob in the Archive tier.
@@ -88,9 +89,9 @@ Once a [Set Blob Tier](/rest/api/storageservices/set-blob-tier) request is initi
8889
To learn how to rehydrate a blob by changing its tier to an online tier, see [Rehydrate a blob by changing its tier](archive-rehydrate-to-online-tier.md#rehydrate-a-blob-by-changing-its-tier).
8990

9091
> [!CAUTION]
91-
> Changing a blob's tier doesn't affect its last modified time. If there is a [lifecycle management](./lifecycle-management-overview.md) policy in effect for the storage account, then rehydrating a blob with **Set Blob Tier** can result in a scenario where the lifecycle policy moves the blob back to the Archive tier after rehydration because the last modified time is beyond the threshold set for the policy.
92+
> Changing a blob's tier doesn't affect its last modified time. If there is a [lifecycle management](./lifecycle-management-overview.md) policy in effect for the storage account, then rehydrating a blob with **Set Blob Tier** can result in a scenario where the lifecycle policy moves the blob back to the Archive tier after rehydration because the last modified time is beyond the threshold set for the policy.
9293
>
93-
> To avoid this scenario, rehydrate the archived blob by copying it instead, as described in the [Copy an archived blob to an online tier](#copy-an-archived-blob-to-an-online-tier) section. Performing a copy operation creates a new instance of the blob with an updated last modified time, so it won't trigger the lifecycle management policy.
94+
> To avoid this scenario, add the `daysAfterLastTierChangeGreaterThan` condition to the `tierToArchive` action of the policy. Alternatively, you can rehydrate the archived blob by copying it instead, as described in the [Copy an archived blob to an online tier](#copy-an-archived-blob-to-an-online-tier) section. Performing a copy operation creates a new instance of the blob with an updated last modified time, so it won't trigger the lifecycle management policy.
9495
9596
## Check the status of a blob rehydration operation
9697

articles/storage/blobs/archive-rehydrate-to-online-tier.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: normesta
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 07/26/2022
10+
ms.date: 08/24/2022
1111
ms.author: normesta
1212
ms.reviewer: fryu
1313
ms.custom: devx-track-azurepowershell
@@ -18,7 +18,7 @@ ms.subservice: blobs
1818

1919
To read a blob that is in the Archive tier, you must first rehydrate the blob to an online tier (Hot or Cool) tier. You can rehydrate a blob in one of two ways:
2020

21-
- By copying it to a new blob in the Hot or Cool tier with the [Copy Blob](/rest/api/storageservices/copy-blob) operation. Microsoft recommends this option for most scenarios.
21+
- By copying it to a new blob in the Hot or Cool tier with the [Copy Blob](/rest/api/storageservices/copy-blob) operation.
2222
- By changing its tier from Archive to Hot or Cool with the [Set Blob Tier](/rest/api/storageservices/set-blob-tier) operation.
2323

2424
When you rehydrate a blob, you can specify the priority for the operation to either standard priority or high priority. A standard-priority rehydration operation may take up to 15 hours to complete. A high-priority operation is prioritized over standard-priority requests and may complete in less than one hour for objects under 10 GB in size. You can change the rehydration priority from *Standard* to *High* while the operation is pending.

articles/storage/blobs/lifecycle-management-overview.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use Azure Storage lifecycle management policies to create automated
55
author: normesta
66

77
ms.author: normesta
8-
ms.date: 05/09/2022
8+
ms.date: 08/24/2022
99
ms.service: storage
1010
ms.subservice: common
1111
ms.topic: conceptual
@@ -101,7 +101,8 @@ The following sample rule filters the account to run the actions on objects that
101101
"daysAfterModificationGreaterThan": 30
102102
},
103103
"tierToArchive": {
104-
"daysAfterModificationGreaterThan": 90
104+
"daysAfterModificationGreaterThan": 90,
105+
"daysAfterLastTierChangeGreaterThan": 7
105106
},
106107
"delete": {
107108
"daysAfterModificationGreaterThan": 2555
@@ -164,6 +165,7 @@ The run conditions are based on age. Current versions use the last modified time
164165
| daysAfterModificationGreaterThan | Integer value indicating the age in days | The condition for actions on a current version of a blob |
165166
| daysAfterCreationGreaterThan | Integer value indicating the age in days | The condition for actions on a previous version of a blob or a blob snapshot |
166167
| daysAfterLastAccessTimeGreaterThan | Integer value indicating the age in days | The condition for a current version of a blob when access tracking is enabled |
168+
| daysAfterLastTierChangeGreaterThan | Integer value indicating the age in days after last blob tier change time | This condition applies only to `tierToArchive` actions and can be used only with the `daysAfterModificationGreaterThan` condition. |
167169

168170
## Examples of lifecycle policies
169171

@@ -235,7 +237,7 @@ In the following example, blobs are moved to cool storage if they haven't been a
235237

236238
### Archive data after ingest
237239

238-
Some data stays idle in the cloud and is rarely, if ever, accessed. The following lifecycle policy is configured to archive data shortly after it's ingested. This example transitions block blobs in a container named `archivecontainer` into an archive tier. The transition is accomplished by acting on blobs 0 days after last modified time:
240+
Some data stays idle in the cloud and is rarely, if ever, accessed. The following lifecycle policy is configured to archive data shortly after it's ingested. This example transitions block blobs in a container named `archivecontainer` into an archive tier. The transition is accomplished by acting on blobs 0 days after last modified time.
239241

240242
```json
241243
{
@@ -251,7 +253,9 @@ Some data stays idle in the cloud and is rarely, if ever, accessed. The followin
251253
},
252254
"actions": {
253255
"baseBlob": {
254-
"tierToArchive": { "daysAfterModificationGreaterThan": 0 }
256+
"tierToArchive": {
257+
"daysAfterModificationGreaterThan": 0
258+
}
255259
}
256260
}
257261
}
@@ -387,9 +391,15 @@ The platform runs the lifecycle policy once a day. Once you configure a policy,
387391

388392
The updated policy takes up to 24 hours to go into effect. Once the policy is in effect, it could take up to 24 hours for the actions to run. Therefore, the policy actions may take up to 48 hours to complete. If the update is to disable or delete a rule, and enableAutoTierToHotFromCool was used, auto-tiering to Hot tier will still happen. For example, set a rule including enableAutoTierToHotFromCool based on last access. If the rule is disabled/deleted, and a blob is currently in cool and then accessed, it will move back to Hot as that is applied on access outside of lifecycle management. The blob won't then move from Hot to Cool given the lifecycle management rule is disabled/deleted. The only way to prevent autoTierToHotFromCool is to turn off last access time tracking.
389393

390-
### I manually rehydrated an archived blob. How do I prevent it from being moved back to the Archive tier temporarily?
394+
### I rehydrated an archived blob. How do I prevent it from being moved back to the Archive tier temporarily?
391395

392-
When a blob is moved from one access tier to another, its last modification time doesn't change. If you manually rehydrate an archived blob to hot tier, it would be moved back to archive tier by the lifecycle management engine. Disable the rule that affects this blob temporarily to prevent it from being archived again. Re-enable the rule when the blob can be safely moved back to archive tier. You may also copy the blob to another location if it needs to stay in hot or cool tier permanently.
396+
If there's a lifecycle management policy in effect for the storage account, then rehydrating a blob by changing it's tier can result in a scenario where the lifecycle policy moves the blob back to the archive tier. This can happen if the last modified time, creation time, or last access time is beyond the threshold set for the policy. There's three ways to prevent this from happening:
397+
398+
- Add the `daysAfterLastTierChangeGreaterThan` condition to the tierToArchive action of the policy. This condition applies only to the last modified time. See [Use lifecycle management policies to archive blobs](archive-blob.md#use-lifecycle-management-policies-to-archive-blobs).
399+
400+
- Disable the rule that affects this blob temporarily to prevent it from being archived again. Re-enable the rule when the blob can be safely moved back to archive tier.
401+
402+
- If the blob needs to stay in the hot or cool tier permanently, copy the blob to another location where the lifecycle manage policy is not in effect.
393403

394404
### The blob prefix match string didn't apply the policy to the expected blobs
395405

articles/storage/blobs/lifecycle-management-policy-configure.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ To enable last access time tracking with the Azure portal, follow these steps:
3838
1. Navigate to your storage account in the Azure portal.
3939
1. In the **Data management** section, select **Lifecycle management**.
4040

41-
:::image type="content" source="media/lifecycle-management-policy-configure/last-access-tracking-enable.png" alt-text="Screenshot showing how to enable last access tracking in Azure portal":::
41+
> [!div class="mx-imgBorder"]
42+
> ![Screenshot showing how to enable last access tracking in Azure portal.](media/lifecycle-management-policy-configure/last-access-tracking-enable.png)
4243
4344
#### [PowerShell](#tab/azure-powershell)
4445

48.8 KB
Loading
73.7 KB
Loading
94.1 KB
Loading

0 commit comments

Comments
 (0)