Backup your AWS instances using AWS managed service - AWS Backup - convenient way



When you will deploy your IT infrastructure in AWS, you also need to ensure the backup and restore process of your instances to maintain the business continuity. Today, in this article, we will discuss about a AWS managed service that helps us on this.

AWS backup can be set into 2 distinct ways:
  • Manual method – Via AWS console.
  • Automated process along with CI/CD – Via Terraform and GitHub.
This article will be restricted to the "Manual method". So, this article is intended for the AWS beginners or for those AWS users who prefer to set everything up from the AWS console by themselves.

Let's start without wasting any more time.

When we think about backup, two important jargons come to our mind first -
  • Backup policy
  • Retention criterion.
Backup policy is the predefined policy which states if backup to be taken on daily, weekly or monthly basis. 
Retention criterion means the life-cycle of those backups. 

Now, let’s dig the step by step process for setting up the AWS backup.

Step 1:

Click on Service and search for AWS Backup.

AWS Backup in Services
Step 2: 
Click on "Create a backup plan"
AWS - Create a backup plan
Step 3:
Now, you have 3 options: 
    • You can start from an existing plan
    • You can create a new plan from the scratch.
    • You can create a JSON file defining your backup and it's criterion.


Choose the AWS Backup Plan Type

Step 4:
For better understanding, let's build the plan from the scratch.
AWS Backup plan from scratch

Step 5:
Give a name to your backup plan. For example: "Demo"
AWS Backup Plan name

Step 6:
Provide a rule name. For example: "Demo-Daily". Select the frequency and backup window. You can use predefined or you can define them by yourself. Mention the "Lifecycle" for your backup. This is the field where you mention when those snapshot will be moved to "Glacier" and you need to provide the "Expiry" meaning at what time you want to delete them.
  
AWS Backup rule configuration

Step 7:
Now, at step 7, you define the backup vault. You can tag them. The tag will help you to determine the recovery point.
Defining AWS Backup Vault.

Step 8:
Once you provide all information, click on "create plan" to initiate AWS backup.
Create AWS Backup Plan

After you click on "Create plan", you will get the summary of what have you set so far. 

AWS Backup Plan Summery

Till now, you have not assigned this plan to any resources. Now you can do that under "Resource assignments" section

Resource assignment AWS Backup

Provide the required values in this section. You can take backup using "Default" IAM role or you can create an IAM role to perform this backup operation. In addition, the resource [be it volumes (EBS), EFS, DynamoDB etc] needs to be tagged so that they can be backed up. Alternatively, you can specify the "ResourceID" if you want to set the backup for all similar resource.

tag based assignment - AWS Backup

Now, you are all set. Your assigned resources will be backed up as per your backup plan.

You can also take on-demand backup or perform the restore of those instances using specific options.
On demand backup and restore - AWS Backup

Backup and restore job status for the last 24 hours can be found in dashboard.

Backup status

Note:
Normally, there is no price involved in restoration except DynamoDB or EFS. You can refer the price chart in the following AWS link: https://aws.amazon.com/backup/pricing/

Takeout from this article:

We have checked the managed service "AWS Backup" and have seen how to use this. 

Future scope:

In the next post, we'll see how can we implement AWS backup using Terraform and GitHub CI/CD. 

Conclusion:

I expect that the step-by-step guide will help new AWS users to set the AWS backup for their instances. Please feel free to comment about the article if it helps you or not. I welcome any suggestion(s) for improving the quality of the article (if any). 

Comments