How to Backup AWS EC2 Instance?

In this tutorial, I will show you three ways to backup your AWS EC2. Using AWS Backup Service, Using Life Cycle Manager and Manually.

Let’s say we have a AWS EC2 Instance and we want to backup this instance for future using. How can we do that?

Before going further, we need to understand about Amazon Machine Images (AWS AMI) and Amazon Elastic Block Store (EBS) Snapshot.

EBS Snapshot: Working on any EBS Volume, does not matter it’s a root volume (for OS booting) or Data Volume. Consider it a data backup snapshot.

AWS AMI: This is the image where you can launch a new EC2 instance using this image. When taking a AWS AMI, you have options to include only Root EBS Volume or Adding other volume in the image

1. Manually Backup EC2 Instance:

The easy one, from AWS Management console you can create a EBS Snapshot as above screenshot, or Create a AMI as below.

2. Automatically Backup using AWS EC2 – Data Lifecyle Manager (DLM)

  • We can backup EBS or AMI
  • Support Schedule Backup
  • Support to Archive Backup (Cheaper than standard backup)
  • Cross-region copy…

3. Automatically Backup using AWS Backup Service

AWS Backup Service support backup for many services, including EC2

  • Create Backup Vault (like a folder)
  • Create Backup Plan (define timing, retention…)
  • Adding EC2 server to backup plan

4. Other Ways:

There are some custom ways that we can use:

  • Using 3rd party application (N2WS, Acronis….)
  • Writing a script by any language (AWS CLI, Python….)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *