We have previously gone through how to create an EBS snapshot lifecycle policy with DLM, but can we take this a little further? Can we backup more than just EBS volumes quickly and easily? With AWS Backup, yes, we can.
AWS Backup allows you to create a backup plan for multiple resources. These resources can be explicitly identified with a resource ID or we can use tags. AWS Backup currently backs up EBS volumes, EFS file systems, RDS databases, DynamoDB tables, and Storage Gateway volumes to S3. It also manages the lifecycle of these backups.
Backup All The Things
We are going to create a backup plan that will backup a small variety of resources using tags and resource IDs.
To get started, go to the AWS Backup console and select Create Backup plan, as shown below.
For Start options, select Build a new plan and set a Backup plan name.
Now we need to set up the Backup rule configuration. Here we will set the rule name, frequency, backup window and lifecycle. As you can see below I have set a daily frequency and used the default backup window. For the lifecycle you should take into consideration what you are planning to backup and how long you will need those backups for. Storage costs will become a factor if you are backing up a large amount of data.
For this example configuration I have set the transition to cold storage to occur after 3 months and an expiration after 1 year. Both options can be set to never, but again, you will need to consider the cost of your storage.
Next we can add optional recovery point tags.
Tags for the backup plan itself can also be added.
Finally, we just need to click Create plan.
Our Backup plan has been created, but all it is at the moment is a plan, we still need to assign resources to be backed up.
As mentioned previously, resources can either be explicitly identified for backup using a resource ID, or we can use tags, as we do with the EBS snapshot lifecycle.
To assign resources we need to select our newly created backup plan from the dashboard.
Select Assign resources (either button will do just fine, I’m unsure why we need two here…)
Give the resource assignment a name and choose an IAM role. We’ll stick with the default role but you can create your own role to be used here if you wish.
Finally, we need to assign the resources we want to back up. I have added a mix of resources as you can see below. Once you’ve selected your resources to be backup up, select Assign resources and that’s it.
You can now see the resource assignment in the console of your backup plan. You can also add more resources in the future as and when required.
Now you have a consistent backup policy across multiple resources that can be easily managed in one place and give you time to do something a little more interesting.