AWS Development (8 Blogs) Become a Certified Professional
AWS Global Infrastructure

Cloud Computing

Topics Covered
  • AWS Architect Certification Training (75 Blogs)
  • AWS Development (7 Blogs)
  • SFDC Administration Foundation (1 Blogs)
  • Salesforce Admin and Dev Foundation (20 Blogs)
SEE MORE

How To Restore EC2 From Snapshot?

Last updated on Sep 03,2024 37.3K Views

Priyaj Kumar is an AWS aspirant working as a Research Analyst at... Priyaj Kumar is an AWS aspirant working as a Research Analyst at Edureka. He is working on different AWS services and has good knowledge...
2 / 11 Blog from AWS Compute Services

Amazon EC2 and S3 are the most widely used services in Amazon. EC2 being instance based compute service and S3 being a lightweight storage service. It is always a good practice to create a backup for your EC2 instances so that if your instance is deleted or stops working you can restore EC2 from snapshot created. Find out more about the AWS Training and Certification.

Creating backups and recovery modules are one of the best methods for disaster management. In the case of data loss, you can always use the backups so that your work, business is not affected. Now that you know why backups and recovery modules are necessary, let me guide you through the topics that I will be discussing in this article about “How To Restore EC2 From Snapshot“.

 

What Are EC2 and S3?

Amazon Web Services commonly known as AWS is a subsidiary of  Amazon that provides on-demand cloud computing platform. AWS provides many services out of which EC2 and S3 are the ones which are commonly used.

Amazon EC2 forms the central part of Amazon’s cloud computing platform. Amazon allows individuals to rent virtual computers to run their own application. These virtual computers are known as an EC2 instance. EC2 instance in AWS are pre-defined with most commonly used Operating systems, you can create an operating system as per your requirement also. 

Amazon S3 is a “simple storage service” provided by Amazon that provides object storage in the web interface. S3 uses the scalable storage infrastructure to provide storage to its customers in the global e-commerce network.

In this article,  we will be focusing mostly on EC2 and S3. Now that you know what is Amazon EC2 and Amazon S3, let’s find out how are we going to use it in the process to restore EC2 instance using snapshot.

Related Learning: AWS Interview Questions about EC2

What Is EBS Volume?

Amazon EBS (Elastic Block Storage) provides raw block-level storage that can be attached to Amazon EC2 and also used in Amazon RDS. Amazon EBS was launched in August 2008. EBS is used at places where there is:

  1. Frequent Data Change
  2. Data that need long-term persistence
  3. Databases where the frequency of read and write operations are more.
  4. Data that need constant updates
  5. Storage for Database Applications

What Is EBS Snapshot?

EBS Snapshot is used to backup data from EBS Volume to S3 by taking an in-time snapshot. Snapshot is nothing but an incremental backups. The nature of EBS Snapshot is same as that of the original volume (encrypted or not) and the nature of volumes created by EBS Snapshot remains same as that of the Snapshot (encrypted or not).

backing-up-amazon ec2- How To Restore EC2 From Snapshot-Edureka

You can backup your data present in EBS Volume to Amazon S3 by taking point-in-time snapshot. Snapshots are incremental backups. Incremental backup means a copy containing only the files which are updated. This helps in minimizing the time required to create the backup.

Now that you know all about the things related to the storage services provided by Amazon, let’s learn how you can implement the above-given information practically.

Demo : (Create An Instance, Delete It and Restore EC2 From Snapshot)

In the article about how to restore EC2 from Snapshot, I will be working on the following things:-

  1. Create An EC2 Instance
  2. Create File To Verify After The Process To Restore EC2 From Snapshot
  3. Create An EBS Snapshot For The Instance
  4. Delete The EC2 Instance
  5. Restore EC2 From Snapshot
    1. Create An AMI From The EBS Snapshot
    2. Launch The Created Amazon AMI Image
  6. Verify Whether Files Are Present Or Not?

Let’s take a closer look at each of the steps.

  1. Create An Amazon EC2 Instance
    Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaLaunch EC2 Instance using AWS Console.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaSelect the type of Instance.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaSelect the Storage type. Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaSelect the VPC and Subnet in which you want your Instance.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaAdd storage.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaAdd Tags to your Instance.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaConfigure the Security Group.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaVerify the details. Click on Launch.Create EC2 Instance-How To Restore EC2 From Snapshot-EdurekaSelect the key-pair to access your Instance.Your Instance is created. Now it’s time to access the instance and create files.
  2. Create File To Verify Later
    File in EC2 instance-How To Restore EC2 From Snapshot-EdurekaCreate a Directory named EdurekaDemo. Move to the directory. Create a file named edurekademotext.txt. Open the text file. File in EC2 instance-How To Restore EC2 From Snapshot-EdurekaWrite some text so that you can verify.
  3. Create EBS Snapshot For The Instance
    Locate Volume -How To Restore EC2 From Snapshot-EdurekaLocate the Volume.
    Create Snapshot -How To Restore EC2 From Snapshot-EdurekaCreate Snapshot.Create Snapshot -How To Restore EC2 From Snapshot-EdurekaGive a description to your Snapshot and create Snapshot.
  4. Delete The EC2 Instance
    Delete Instance -How To Restore EC2 From Snapshot-EdurekaTerminate the Instance.
  5. Restore EC2 From Snapshot
    1. Create An AMI From The EBS Snapshot
      Create Image from Snapshot -How To Restore EC2 From Snapshot-EdurekaCreate Image from the EBS Snapshot.Create Image from Snapshot -How To Restore EC2 From Snapshot-EdurekaSelect a Name and Description and don’t forget to select Hardware-assisted Virtualization.Create Image from Snapshot -How To Restore EC2 From Snapshot-EdurekaYour image creation request is processed and will be created in few minutes.
    2. Launch The Created AMI
      Launch AMI -How To Restore EC2 Instance From Snapshot-EdurekaCreate on Launch and redo all the steps done while creating EC2 Instance.Launching EC2 Instance using Snapshot-How To Restore EC2 From Snapshot-EdurekaYour EC2 Instance is restored.Launching EC2 Instance using Snapshot-How To Restore EC2 From Snapshot-EdurekaYour EC2 Instance is Created. 
  6. Verify Whether Files Are Present Or Not?
    EC2 Instance Restored-How To Restore EC2 From Snapshot-EdurekaVerify whether the file we created is present or not?EC2 Instance Restored-How To Restore EC2 From Snapshot-EdurekaVerified, the directory and file I created are present in the restored EC2 Instance.

This was the process to restore EC2 Instance using Snapshot is successful. I hope you understood the demo. The best way to learn is by implementing it. Go ahead and implement it.

Check out our AWS Certification Training in Top Cities

IndiaUnited StatesOther Countries
AWS Training in HyderabadAWS Training in AtlantaAWS Training in London
AWS Training in BangaloreAWS Training in BostonAWS Training in Adelaide
AWS Training in ChennaiAWS Training in NYCAWS Training in Singapore

If you wish to learn Amazon Web Services and build a career in Cloud Computing, then check out our AWS Training in which comes with instructor-led live training and real-life project experience. This training will help you understand Amazon Web Services in depth and help you achieve mastery over the subject.

Got a question for us? Please mention it in the comments section and we will get back to you or post your question at Edureka | Community. At Edureka Community we have more than 1,00,000+ tech-fanatics ready to help.

Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

How To Restore EC2 From Snapshot?

edureka.co