Performing a Backup and Restore Using AMI and EBS

Hands-On Lab

 

Photo of Mark Richman

Mark Richman

AWS Training Architect II in Content

Length

00:30:00

Difficulty

Intermediate

Welcome to this live hands-on AWS lab for performing a backup and restore using AMIs and EBS. This lab will explore several common backup and restore methods for the Amazon EC2 service. By completing this lab, you will gain hands-on experience with: EBS snapshots Amazon Machine Images (AMIs) For administrators and operations personnel, it is extremely important to understand the need for backing up application resources. These actions are one step you can take to ensure quick recovery from disasters and/or to have the ability to roll back changes if necessary. Good luck, and enjoy the lab!

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Performing a Backup and Restore Using AMI and EBS

Introduction

In this hands-on lab, we will perform a backup and restore using AMIs and EBS. This activity will explore several common backup and restore methods for the Amazon EC2 service.

Solution

Log in to the live AWS environment using the credentials provided. Make sure you're in the N. Virginia (us-east-1) region throughout the lab.

Create an EBS Snapshot

  1. Navigate to EC2 > Instances.
  2. Check the box beside one of the "webserver-instance" instances.
  3. Click the Root device link in the Description section below, and then click the EBS ID link.
  4. On the Volumes page, make sure the listed volume is selected, and then click Actions and select Create Snapshot.
  5. Enter a description (e.g., "WordPressSnap").
  6. Click Create Snapshot.

Create a New EBS Volume from a Snapshot

  1. Navigate to Snapshots.
  2. Check the box beside the snapshot you just created.
  3. Click Actions, and select Create Volume.
  4. Change the volume size to 10 GiB.
  5. Click Create Volume.
  6. Click Close.
  7. Select the newly created volume, and then click Actions and select Attach Volume.
  8. In the Instance dropdown, select the webserver-instance and click Attach.

Create Two EC2 AMIs

Method 1

  1. Navigate to Instances.
  2. Check the box beside one of the "webserver-instance" instances.
  3. Click Actions, then Image, and then Create Image.
  4. Add a name and description (e.g., both could be "AMI1").
  5. Click Create Image, and then Close.
  6. Choose AMIs from the left menu to see the image you created.
  7. Once the image is available, navigate to the instances page.
  8. Click Launch Instance.
  9. Choose My AMIs in the left column.
  10. Click Select.
  11. Leave t2.micro selected, and click Next: Configure Instance Details.
  12. On the Configure Instance Details page:
    • Network: Leave default
    • Subnet: AppLayer1private
    • Auto-assign Public IP: Disable
  13. Click Next: Add Storage, then Next: Add Tags, and then Next: Configure Security Group.
  14. Click to Select an existing security group.
  15. Select the WebServerSecurityGroup one from the table.
  16. Click Review and Launch, and then Launch.
  17. In the key pair dialog, select Proceed without a key pair.
  18. Click Launch Instances, and then View Instances.

Method 2

  1. Navigate to Snapshots.
  2. Check the box beside the snapshot you made earlier.
  3. Click Actions, and select Create Image.
  4. Enter a name and description (e.g., both could be "AMI2").
  5. Change Virtualization type to Hardware-assisted virtualization.
  6. Click Create, and then Close.
  7. Choose AMIs from the left menu to see the image you created.

Conclusion

Congratulations on completing this hands-on lab!