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
Copy file name to clipboardExpand all lines: articles/storage/blobs/storage-lifecycle-management-concepts.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ This article shows how to manage policy by using the portal and PowerShell metho
52
52
> [!NOTE]
53
53
> If you enable firewall rules for your storage account, lifecycle management requests may be blocked. You can unblock these requests by providing exceptions for trusted Microsoft services. For more information, see the Exceptions section in [Configure firewalls and virtual networks](https://docs.microsoft.com/azure/storage/common/storage-network-security#exceptions).
54
54
55
-
### Azure portal
55
+
#[Portal](#tab/azure-portal)
56
56
57
57
There are two ways to add a policy through the Azure portal.
58
58
@@ -122,7 +122,7 @@ There are two ways to add a policy through the Azure portal.
122
122
123
123
6. For more information about this JSON example, see the [Policy](#policy) and [Rules](#rules) sections.
124
124
125
-
### PowerShell
125
+
#[Powershell](#tab/azure-powershell)
126
126
127
127
The following PowerShell script can be used to add a policy to your storage account. The `$rgname` variable must be initialized with your resource group name. The `$accountName` variable must be initialized with your storage account name.
## Azure Resource Manager template with lifecycle management policy
155
+
#[Template](#tab/template)
156
156
157
157
You can define lifecycle management by using Azure Resource Manager templates. Here is a sample template to deploy a RA-GRS GPv2 storage account with a lifecycle management policy.
158
158
@@ -194,6 +194,8 @@ You can define lifecycle management by using Azure Resource Manager templates. H
194
194
}
195
195
```
196
196
197
+
---
198
+
197
199
## Policy
198
200
199
201
A lifecycle management policy is a collection of rules in a JSON document:
@@ -341,6 +343,9 @@ This example shows how to transition block blobs prefixed with `container1/foo`
341
343
342
344
Some data stays idle in the cloud and is rarely, if ever, accessed once stored. The following lifecycle policy is configured to archive data once it's ingested. This example transitions block blobs in the storage account within container `archivecontainer` into an archive tier. The transition is accomplished by acting on blobs 0 days after last modified time:
343
345
346
+
> [!NOTE]
347
+
> It is recommended to upload your blobs directly the archive tier to be more efficient. You can use the x-ms-acess-tier header for [PutBlob](https://docs.microsoft.com/rest/api/storageservices/put-blob) or [PutBlockList](https://docs.microsoft.com/rest/api/storageservices/put-block-list) with REST version 2018-11-09 and newer or our latest blob storage client libraries.
348
+
344
349
```json
345
350
{
346
351
"rules": [
@@ -423,9 +428,8 @@ For data that is modified and accessed regularly throughout its lifetime, snapsh
423
428
**I created a new policy, why do the actions not run immediately?**
424
429
The platform runs the lifecycle policy once a day. Once you configure a policy, it can take up to 24 hours for some actions to run for the first time.
425
430
426
-
**I manually rehydrate an archived blob, how do I prevent it from being moved back to the Archive tier temporarily?**
427
-
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. Copy the blob to another location if it needs to stay in hot tier permanently. Re-enable the rule when the blob can be safely moved back to archive tier.
428
-
431
+
**I manually rehydrated an archived blob, how do I prevent it from being moved back to the Archive tier temporarily?**
432
+
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.
0 commit comments