Skip to content

AWS EC2 - Backup & Restore Process

-1

Hi,

We have a lot of VMS created on Ec2. Is there anyway to back these up, so if an employee deletes these we can get them back?

#1: How to backup #2: If they are all accidentally deleted, how do we re-create them quickly?

Thank you

asked a year ago389 views

1 Answer
1
Accepted Answer

You can implement a robust backup and restore strategy for your EC2 instances using several AWS services:

How to backup EC2 instances

  1. AWS Backup: This is a fully managed backup service that centralizes and automates backups across AWS services, including EC2 instances.
  • Create a backup plan that defines daily frequency and retention policies
  • Monitor your backups through the AWS Backup console
  1. Amazon Data Lifecycle Manager (DLM): Automates the creation and management of EBS snapshots.
  • Define backup schedules and retention policies
  • Particularly useful for managing backups across multiple volumes and instances
  • Can create application-consistent backups by running custom scripts
  1. For Windows applications with VSS support: AWS Backup can create application-consistent backups.
  • Requires installing and configuring the SSM agent
  • Adding appropriate IAM policies
  • Installing VSS components on the Windows instance
  • Enabling VSS in AWS Backup when creating your backup

How to restore if instances are accidentally deleted

  1. Restore from AWS Backup:
  • Access the AWS Backup console
  • Select the backup vault containing your backups
  • Choose the recovery point for the deleted instance
  • Initiate the restore process, specifying parameters like instance type, VPC, subnet, and security groups
  1. Restore from EBS snapshots:
  • EBS snapshots can be used to create new volumes
  • These volumes can be attached to new EC2 instances
  • For partial restores, you can attach the restored volume to a running instance and copy specific data
  1. Cross-region recovery:
  • If you've configured cross-region backup copies, you can restore from another AWS region
  • This provides additional protection against regional failures
  1. Item-level recovery:
  • AWS Backup supports item-level search and recovery
  • You can restore specific files rather than entire volumes
  • Restored items can be placed in an S3 bucket and then copied to your EC2 instance

For best practices, consider tagging your resources appropriately to manage and identify backups, and maintain separate volumes for operating systems, applications, logs, and data to allow for more granular backup and restore policies.
Sources
How to enable daily backup on EC2? | AWS re:Post
Amazon EC2 backup and recovery with snapshots and AMIs - AWS Prescriptive Guidance
Create Windows VSS backups - AWS Backup
Enable item-level search and recovery for Amazon EC2 with AWS Backup | AWS Storage Blog
Restore a virtual machine using AWS Backup - AWS Backup

answered a year ago

EXPERT

reviewed a year ago

  • Thank you so much!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.