본문 바로가기
[AWS]/Highly Available, Scalable, AWS Stack

12. Prep for recovery: Create AMI & EBS snapshot

by SAMSUNG CLOUD-OKY 2022. 1. 18.
반응형

 

All right in this video let's see how to do the last two items in our list of checklist here.

It's all for preparation as preparation for recovery.

And these are create the AMI and also create the EBS snapshot.

Right.

So remember the purpose of the AMI is to help us create a replacement server so we can use this AMI

and we can create a replacement for instance.

And this could be in the same availability zone here or it could be in a different availability zone

also depending on the failure scenario that we are looking at.

Right.

And therefore this AMI must have our software right it must have our software it must have our application

it must have our configuration as well.

Well good.

And the snapshot is of of the data right the idea of the snapshot is to is to protect our data.

so that we can restore our data.

If the volume fails right if you don't have the volume the data volume then we should have we should

be able to restore data using the snapshot.

So the snapshot here will be of the data volume.

So the snapshot will be of the data volume and the AMI by the way since it only has to have the software.

Right we just need the software in the AMI because we just want to create the server.

We were not really interested in the data itself.

We just want the server a functioning server with our software with our dependencies with our application

to be made available.

Right.

So therefore the AMI should be of the root volume.

OK.

So this is important.

The AMI will be of the root volume only and the snapshot will be of the data volume.

OK so let's see how do how to do this.

So here's our server right here is our server and this has two volumes OK it has two volumes and the

first one is the data volume and the second one is the second one is the root volume.

Right now if you have to create an AMI we select our instance or we select our instance and we say

from actions image and then create image.

And here because the server has both volumes it has the root volume and the data volume.

We do have an option of creating an AMI with the data as well.

That's possible and that's required in certain types of servers.

Right but here for our purposes.

We just need to use the root volume.

OK so so what we'll have to do is remove this data volume.

Let me go ahead and do that.

And we will just keep the root volume in our AMI and this way we will have our software right our application

as well in this root volume and therefore our AMI will be able to we'll have all the information

required to create a replacement.

server.

OK.

So.

So that's the main thing you have to remember.

is to remove the data volume before creating the AMI.

So let me give this a name something like this.

And let's say this is.

This is for fault tolerance single instance.

So that later if you want to go back to this AMI you can you can always do that.

OK.

So this is our AMI.

Right this is our image and this has only the root one.

OK.

The next step is to create the snapshot.

So so we just go to our volumes here and we have these two volumes and

we select the data volume.

Right the data volume.

Because that's what we need the snapshot for.

And then we say create snapshot and then we just give this a name maybe something like this.

Right.

And then we create our Snapshot.

OK so.

So if you look at the snapshot section now you'll see three right you'll see three.

This one is the snapshot of the data.

volume that we just created right.

This was pretty quick because because the volume was very small.

Right.

And this one here on the top is the snapshot which is backing up the AMI of our.

Server right.

And this one here the last one is is the older AMI that we had created.

OK.

All right but for this module you'll find that there will be two snapshots one for the AMI and the

other one for the snapshot of the data volume.

OK.

All right so in this video as a summary what we have done is we have created the AMI using the root volume

only right because the AMI should just have the software.

Right.

We don't want the data.

The data will come separately.

via the snapshot.

And next we created the snapshot using the data.

volume only right not a snapshot of the root volume just of the data volume.

And later right in the other the three failure scenarios that we will consider in this module.

We will see how to use the snapshot and the AMI for recovery.

All right.

So see you soon in the next set of videos.

 

 

 

반응형

댓글