Instructor: Okay, so let's talk about the differences
of backups and snapshots in RDS.
So backups are going to be continuous
and they allow point in time recovery.
So the backups will happen during the maintenance windows.
And when you delete a database instance,
you can retain all the automated backups
that have been done.
So the backups will have a retention period,
and you set it between zero and 35 days.
So that means that if you wanted to backtrack
to any point of time within the last, say 35 days,
you could use backups for that.
And to disable backups,
you would set the retention period of the backups to zero.
Snapshots are different.
Snapshots will take IO operations
and they will stop the database from seconds to minutes
while the snapshot is being taken.
And if you have a Multi AZ enabled and you do a snapshot,
then the snapshot will not be done on the master,
it will be done on the standby database.
The snapshots are going to be incremental
after this first snapshot
and the first snapshot is going to be taken in full.
And the IO Snapshots, you can copy them
and share them across accounts.
Now, manual snapshots do not expire.
So you can take a manual Snapshots, okay?
And you can take a final snapshot
when you delete your database.
No matter what, if you have a backup or a snapshot
and you do a restore from them,
restoring from an automated backup or database snapshot,
will create a new database instance.
You can not do an in-place restore, okay?
Now, let's talk about snapshots sharing,
because you can not share backups.
So a snapshot can be shared.
And this is a very, very similar way
to how you share EBS snapshot.
So if you remember how you can share EBS snapshots,
then you're good to go with RDS snapshots.
We can share them with our accounts.
And if you allow them to be shared,
then the accounts, other accounts can create an RDS database
directly from your snapshots.
So manual snapshots can be shared with other accounts.
It has to be manual, okay?
And automated snapshots cannot be shared.
You have to copy it first.
So when you share an unencrypted snapshots, it works,
or if you have a snapshot that is encrypted
with a customer master key, it has to be yours,
and then if you do it, you can share it as well.
But if you wanted to share an encrypted snapshots,
you first need to also share the CMK
associated with that snapshots.
So this is the same diagram as EBS
that we've seen from before.
So we have a snapshot that's encrypted
and is shared with another accounts.
The other accounts can only read the snapshots
if it has the IN permissions to get access
to the underlying CMK of the snapshots.
And if that is the case, then the database instance
can be launched and you're good to go.
So if we over look at this database right here,
so here's our database and we have maintenance and backups.
And as you can see, backups are going
to be automatically enabled for seven days,
and then the tags are going to be copied
to the snapshots as well.
There's a backup window, which is defined right here,
which is 30 minutes at night.
And you can edit the backup settings if you want
replicate to different region
or to replicate the automated backups.
And then some snapshots also being taken,
they could be automated or manual,
and this one has been automated.
So if you go on the left hand side into automated backups,
as we can see, my database right here
is being currently backed up, okay?
And so the backups will appear right here
and we can get some information.
And you can see in their current region,
they're replicated and they're retained.
And if you go into snapshots,
you will see the manual snapshots or the system snapshots.
So you can take one of your database.
For example, you can take this one
and you could create a snapshot from it.
Action and then take snapshots.
And this snapshots will live forever
because you're taking it manually,
whereas an automated backup or automated snapshots
will go away at some point.
So this is really the idea behind it.
And then once you have your snapshots,
what you can do is you can share them.
So you can take one and then you can copy this one.
And then once it's copied it's yours,
and then you can share the snapshots to another accounts.
And then you can see the snapshots
that have been shared with you right here as well, okay?
So that's it for this lecture.
I hope you liked it.
And I will see you in the next lecture.