Instructor: So let's talk about
a few of the cool other features
that storage accounts support
for blobs and other file types.
Let's talk about lifecycle management.
If we go on the Azure portal
on the storage account under Data management,
we'll see an option called Lifecycle management.
Now, lifecycle management,
and I think I've mentioned this before in this course,
is the ability to move data
from a more expensive pricing tier
down to cheaper tiers as the files get older effectively.
So for log files and backup files,
things that have less value to you as they get older,
but you might still want to keep, you can move them
to cooler or colder levels of storage
and save significant amounts of money.
So this, let's look at this.
I'm going to click on Add a rule.
Give the rule a name.
I'm going to call this the Saving Money Rule.
And I have the option of applying the rule
to all blobs in the entire storage account,
or to set some type of filter so that only blobs
in a certain container get applied.
I also get to choose which type of blobs get picked up.
Now, one of the interesting parts
is whether I want this to operate on
the blobs themselves, snapshots,
which we'll talk about in the section coming
in terms of Azure files and points in time recovery
for Azure files or versions of files.
So imagine you've turned on versioning
and over six months, nine months, some of the older versions
become less and less important to you.
You can actually just save money
by storing the older versions in cooler
or colder storage that you need in case of emergency,
but you're not likely to access frequently.
So I'm going to do this based on base blobs
just for this example.
Now what we're setting up here is a rule
that says if the blob was last modified
more than so many days ago, let's say more than 30 days ago,
then what do we want to happen to it?
Now we can just delete it.
So if it's a daily log file,
then maybe you don't need to keep more than 30 days
of daily log files.
And so on the 31st day,
this lifecycle management rule will delete the file,
and that's perfectly fine too.
Or maybe you just want to move it from hot storage
to cool storage,
or even as far as going to cold storage,
if you really don't think you're going to need this file
after 30 days.
Now notice some of the comments here.
I haven't mentioned it before in this course,
but as you get into cool, cold and archive,
there is some minimum charges
that come into play.
So when you move a file into cool storage,
you're going to be charged a minimum of 30 days
at that rate.
So you can't just move a file into cool storage for 24 hours
and then delete the file
and expect to save money just for that one day.
You've got a minimum terms of the charge.
You can still delete the file,
but you'll be charged for the full 30 days.
Cold storage is for 90 days,
and archive storage is going to minimum charge you 180 days
at that lowest rate.
But remember, archive storage can be 5%
of the cost of hot storage.
So you're saving a significant amount of money,
and even if you store it just for a month,
you're still saving money at that level.
So as we can see, lifecycle management is where you go.
If you see this on the exam
and it's asking about setting up a job
to automatically move blobs to save money,
then you should be thinking about lifecycle management
as being the easiest way to do that.