Manage Azure Blob Lifecycle Flashcards
What are some important notes about access tiers in azure storage?
- Can be set on blob during or after upload
- hot and cool can be set at account level, archive has to be set at blob level
- data in archive tier is stored offline
- hot and cool tiers support all redundancy options but archive only supports LRS, GRS and RA-GRS
What are blob storage lifecycle mgmt policies? What do they let us do?
- only available on gen v2 SAs
- transition blobs to a cooler tier to optimise performance and cost
- delete blobs at end of lifecycles
- define rules to be run once per day at storage account level
- apply rules to containers or a subset of blobs
How can we best design storage options?
- By adjusting storage tiers in respect to age of data we can design the least expensive storage options for your needs
- to achieve the transition, lifecycle mgmt policy rules are available to move aging data to cooler tiers
Structurally what makes a lifecycle mgmt policy?
- collection of rules in JSON doc
- at least one rule is required and you can define up to 100
- each rule definition within a policy includes a filter set and an action set
- filter set = limits rule actions to certain set of objects within a container or objects names
- action set = applies the tier or delete actions to the filtered set of objects
- when changing access tier the process cant be cancelled once started
What does each rule within a policy have?
- name
- enabled (default is true)
- type
- definition (made up of filter and action set)
What are some types of filters?
- blobTypes
- prefixMatch
- blobIndexMatch
- if more than one defined a logical AND runs on filters
What are some types of Actions?
- tierToCool
- enableAutoTierToHotFromCool
- tierToArchive
- Delete
- applied to filtered blobs when the run condition is met
What does azure do if more than one action is defined on the same blob in a mgmt policy?
- it will apply the least expensive action to the blob
- e.g. delete is cheaper than tierToArchive, tierToArchive is cheaper than tierToCool
Wjhat are some examples of run conditions?
- daysAfterModificationsGreaterThan
- daysAfterCreationGreaterThan
- daysAfterLastAccessTimeGreaterThan
- daysAfterLastChangeGreaterThan
How can we manage policies using the portal?
- under data mgmt inside storage account resource
- select lifecycle management to change rules
- select list view and then add rule with action and filter sets
How can we manage policies using the CLI?
- write policy to a JSON file and call ‘az storage account management-policy create’
- must be read or written in full, no partial updates
How can we rehydrate a an archived blob?
- in order to read or modify an archived blob we must rehydrate to online tier (hot or cool)
- We can copy an archived blob to an online tier blob = recommended for most scenarios
- Change a blobs access tier to an online tier = change tier of original blob
- can take several hours either way
What are the priorities for blob rehydration?
- priority set using optional x-ms-rehydrate-priority header on a Set Blob Tier or Copy Blob from URL operation
- standard priority = rehydration request is processed in order it was received and might take up to 15 hours
- high = prioritised over standard priority requests and might complete in 1 hour for objects under 10GBt
What happens when we copy an archived blob to a new blob in an online tier?
- source blob remains unmodified in archive tier
- must be copied to a new blob with a different name or container
- cant overwrite source blob
- can only copy within same SA
- cant copy an archived blob to a destination blob that is also in archive tier