How to Use EC2 Lifecycle manager for Automated EC2 EBS volume Backup



How to Use EC2 Lifecycle manager for Automated EC2 EBS volume Backup
Wednesday, September 12, 2018
5:38 PM

Amazon Data Lifecycle Manager (DLM) for EBS Snapshots provides a simple, automated way to back up data stored on Amazon EBS volumes. You can define backup and retention schedules for EBS snapshots by creating lifecycle policies based on tags. With this feature, you no longer have to rely on custom scripts to create and manage your backups.

To create a lifecycle policy

<![if !supportLists]>1.     <![endif]>Login to AWS console at https://console.aws.amazon.com/ec2/.

<![if !supportLists]>2.     <![endif]>In the navigation pane, Go to Elastic Block Store -> Lifecycle Manager -> Create snapshot lifecycle policy.



<![if !supportLists]>3.     <![endif]>Fill the required information as requested on screen..

<![if !supportLists]>o   <![endif]>Description—A description of the policy.
<![if !supportLists]>o   <![endif]>Target volumes with tags—this tag will be used to identify the volume which need to be included in backup
<![if !supportLists]>o   <![endif]>Schedule Name—A placeholder name for the schedule
<![if !supportLists]>o   <![endif]>Create snapshots every n Hours—The number of hours between policy runs. The supported values are 12 and 24.
<![if !supportLists]>o   <![endif]>Snapshot creation start time hh:mm UTC—The time of day when policy runs are scheduled to start. The policy runs start within an hour after the scheduled time.
<![if !supportLists]>o   <![endif]>Retention rule—The maximum number of snapshots to retain for each volume. The supported range is 1 to 1000. After the limit is reached, the oldest snapshot is deleted when a new one is created.
<![if !supportLists]>o   <![endif]>Tag created snapshots—A custom Tag will added to snapshot created by DLM. These tags are in addition to the tags applied by Amazon DLM.
<![if !supportLists]>o   <![endif]>IAM role—An IAM role that has permissions to create, delete, and describe snapshots, and to describe volumes. AWS provides a default role, AWSDataLifecycleManagerDefaultRole, or you can create a custom IAM role.
<![if !supportLists]>o   <![endif]>Policy status after creation—Choose Enable policy to start the policy runs at the next scheduled time or Disable policy to prevent the policy from running.


<![if !supportLists]>o   <![endif]>Click Create Policy.

Demo & Scenario which I have tested

(i) I have two EC2 in my environment , One EC2 have tag only at instance level while other EC2 have tag at instance + Volume level.







(ii) My DLM configuration



(iii) Snapshot which created automatically by DLM



(IV) Since there was tag missing on volume for the EC2 01 so Backup is not happen for that ….

To use this solution you need minimum IAM role and Tag on volume for which you want to enable backup

Created with Microsoft OneNote 2016.

Comments

Popular posts from this blog

Azure Storage Account Hot, Cool & Archive Storage

Why Does Cloning A VM From Template Take A Long Time?

RVTools version 2.9 has been released