DEV Community

Cover image for How to Automate AWS EC2 Instance Backups - Amazon Data Lifecycle Manager
Anuvindh for AWS Community Builders

Posted on • Edited on • Originally published at ictpro.co.nz

How to Automate AWS EC2 Instance Backups - Amazon Data Lifecycle Manager

DAY 10 - How to Automate AWS EC2 Instance Backups - Amazon Data Lifecycle Manager

☁️ 100 days of Cloud- Day Ten
Follow Me on Twitter

Image Cover

Tweet This Blog - Read on GitHub - Read On iCTPro.co.nz


🖴 Automated Snapshots

You can create an automated solution using Amazon Data Lifecycle Manager. It will create, copy, delete & retention of EBS snapshots and EBS-backed AMIs.

🚀 Fast Snapshot Restore integration

You can restore the volume immediately by enabling fast restore and instantly deliver all of their provisioned performance.

🏤 Cross-region Copy

You can copy snapshots to other AWS regions automatically. (Disaster recovery)

🧑🏼‍🤝‍🧑🏻 Cross-Account Copy

Automate Snapshots across multiple account.

📒 Tutorial , How to?

In this tutorial we will setup policy to take snapshot in every day and keep last three copies.

Sign in to AWS account and go to EC2 Dashboard.

Select your EC2 and give a tag , Key as Snapshot
and Value as True

Image Tag

then ,

Comments Screenshots
Click on to ** Lifecycle Manager** Under Elastic Block Store LCM
Now Select EBS-Backed AMI Policy and click Next step ami-backed

Now we need to add the tags , these tags should be the same tag attached with ec2 which you are trying to backup. in this case its Snapshot:True

Comments Screenshots
Add tag Image tag
add an Policy description and leave IAM role to Default Role Image IAM
Now you can add Tag for your DLM Policy Image Policytag
Policy Status Enabled, you can reboot instance after snapshot if you want to else leave it as default and click Next Image Plicy

Now Lets Setup the time and retention type and amount of backups to keep . The time Zone is UTC, if you wanna change to your time zone make sure you convert UTC to desired timezone. Here is Savvy Time , a helpful tool to convert time zones.

Image DLMTIME

if you want to add tags for the instance click Copy tags from source. Name the DLM policy using tag. Also if you prefer to do cross region copy , Enable cross-Region copy for this schedule.

Image last

Once you reviewed , Click Create Policy.

🎉Congratulations🎉 you have successfully configured an DLM policy to take snapshots automatically.

Top comments (0)