---
title: AWS EBS Volume Backup Using Automated Snapshots
description: How can you ensure the database hosted on your AWS EBS volumes is backed up to meet required SLAs? Learn how to automate EBS backup using AWS CLI.
image: http://cloud.netapp.com/hubfs/How-to-Automate-Your-EBS-Volumes-Backup-banner.png
---

![NetApp-Blue-logo-sm1](https://bluexp.netapp.com/hubfs/NetApp-Blue-logo-sm1.svg "NetApp-Blue-logo-sm1")

![hamburger icon](https://bluexp.netapp.com/hubfs/NetApp-Blue/hamburger-icon.svg) ![close icon](https://bluexp.netapp.com/hubfs/NetApp-Blue/close-icon.svg)

- Product
  
  ![left nav icons-1](https://bluexp.netapp.com/hubfs/left%20nav%20icons-1.svg)Storage 
    - [NetApp On-premises](https://bluexp.netapp.com/netapp-on-premises)
    - [Cloud Volumes ONTAP](https://bluexp.netapp.com/ontap-cloud)
    - [Amazon FSx for NetApp ONTAP](https://bluexp.netapp.com/fsx-for-ontap)
    - [Azure NetApp Files](https://bluexp.netapp.com/azure-netapp-files)
    - [Google Cloud NetApp Volumes](https://bluexp.netapp.com/google-cloud-netapp-volumes)
  
  
  ![data mobility](https://bluexp.netapp.com/hubfs/NetApp-Blue/data-mobility.svg)Mobility 
    - [Copy and Sync](https://bluexp.netapp.com/cloud-sync-service)
    - [Tiering](https://bluexp.netapp.com/cloud-tiering)
  
  
  ![left nav icons-2](https://bluexp.netapp.com/hubfs/left%20nav%20icons-2.svg)Protection 
    - [Backup and recovery](https://bluexp.netapp.com/cloud-backup)
    - [Disaster recovery](https://bluexp.netapp.com/disaster-recovery)
    - [Replication](https://bluexp.netapp.com/replication)
    - [Ransomware protection](https://bluexp.netapp.com/ransomware-protection)
  
  
  ![left nav icons](https://bluexp.netapp.com/hubfs/left%20nav%20icons.svg)Analysis and control 
    - [Observability](https://bluexp.netapp.com/cloud-insights)
    - [Classification](https://bluexp.netapp.com/netapp-cloud-data-sense)
    - [AIOps & storage health ](https://bluexp.netapp.com/digital-advisor)
    - [Digital wallet](https://bluexp.netapp.com/digital-wallet)
- Resources
  
    - ![solutions database](https://bluexp.netapp.com/hubfs/NetApp-Blue/solutions-protection.svg)CALCULATORS
    - [TCO Azure](https://bluexp.netapp.com/azure-calculator)
    - [TCO AWS](https://bluexp.netapp.com/aws-calculator)
    - [TCO Google Cloud](https://bluexp.netapp.com/google-cloud-calculator)
    - [Cloud Volumes ONTAP Sizer](https://bluexp.netapp.com/cvo-sizer)
    - ![resources explore](https://bluexp.netapp.com/hubfs/NetApp-Blue/resources-explore.svg)EXPLORE
    - [Global Availability Map](https://bluexp.netapp.com/cloud-volumes-global-regions)
- [Help Center](https://bluexp.netapp.com/help-center)

[Get Started](https://cloudmanager.netapp.com/)

 AWS EBS

# AWS Snapshot Automation for Backing Up EBS Volumes

### Share

[![Facebook](https://bluexp.netapp.com/hubfs/Facebook.svg)](https://www.facebook.com/sharer.php?u=https://bluexp.netapp.com/blog/ebs-volumes-backup-automation) [![Twitter](https://bluexp.netapp.com/hubfs/Twitter.svg)](https://twitter.com/share?url=https://bluexp.netapp.com/blog/ebs-volumes-backup-automation) [![LinkedIn](https://bluexp.netapp.com/hubfs/linkedin-1.svg)](https://www.linkedin.com/shareArticle?mini=true&url=https://bluexp.netapp.com/blog/ebs-volumes-backup-automation)

### More about AWS EBS

- [ AWS EBS Multi-Attach Volumes and Cloud Volumes ONTAP iSCSI ](https://bluexp.netapp.com/blog/aws-cvo-blg-aws-ebs-multi-attach-volumes-and-cloud-volumes-ontap-iscsi)
- [ AWS Snapshot Automation for Backing Up EBS Volumes ](https://bluexp.netapp.com/blog/ebs-volumes-backup-automation)
- [ How to Clean Up Unused AWS EBS Volumes with A Lambda Function ](https://bluexp.netapp.com/blog/aws-cvo-blg-how-to-clean-up-unused-ebs-volumes-with-a-lambda-function)
- [ Boost your AWS EBS performance with Cloud Volumes ONTAP ](https://bluexp.netapp.com/blog/aws-cvo-blg-boost-your-aws-ebs-performance-with-cloud-volumes-ontap)
- [ Are You Getting Everything You Can from AWS EBS Volumes?: Optimizing Your Storage Usage ](https://bluexp.netapp.com/blog/aws-ebs-volumes-how-to-optimize-performance-and-cost)
- [ EBS Pricing and Performance: A Comparison with Amazon EFS and Amazon S3 ](https://bluexp.netapp.com/blog/ebs-efs-amazons3-best-cloud-storage-system)
- [ The Largest Block Storage Volumes the Public Cloud Has to Offer: AWS EBS, Azure Disks, and More ](https://bluexp.netapp.com/blog/largest-block-storage-volumes-public-cloud-offer)
- [ Storage Tiering between AWS EBS and Amazon S3 with NetApp Cloud Volumes ONTAP ](https://bluexp.netapp.com/blog/storage-tiering-ontap-cloud-and-amazon-s3)
- [ Lowering Disaster Recovery Costs by Tiering AWS EBS Data to Amazon S3 ](https://bluexp.netapp.com/blog/disaster-recovery-costs-lowered)
- [ AWS Instance Store Volumes & Backing Up Ephemeral Storage to AWS EBS ](https://bluexp.netapp.com/blog/backing-up-ephemeral-storage-to-aws-ebs)

### Subscribe to our blog

Thanks for subscribing to the blog.

### September 10, 2020

### Topics: [Cloud Volumes ONTAP](https://bluexp.netapp.com/blog/topic/cloud-volumes-ontap) [Data Protection](https://bluexp.netapp.com/blog/topic/data-protection)[AWS](https://bluexp.netapp.com/blog/topic/aws)[Backup and Archive](https://bluexp.netapp.com/blog/topic/backup-and-archive)[Advanced](https://bluexp.netapp.com/blog/topic/advanced)[6 minute read](https://bluexp.netapp.com/blog/topic/6-minute-read)

Imagine an application that requires 24x7 availability and can allow a maximum of 15 minutes of downtime. How would you back up a database hosted on[ AWS EBS](https://bluexp.netapp.com/blog/ebs-volumes-5-lesser-known-functions) to meet those required SLAs?

AWS snapshot automation for EBS volume back up is the key to meeting strict recovery objectives. Automating the backup process is ideal since creating multiple regularly scheduled snapshots can be too time consuming to carry out manually. There are a number of methods that can be used to automate the snapshot creation process. It can be done programmatically through the AWS API and the AWS CLI, or through the fully managed [AWS Backup service](https://bluexp.netapp.com/blog/aws-backup-centrally-managed-cvo-blg). Since AWS Backup is a much easier process, it has largely eclipsed the usage of the API and CLI.

In this article, we will discuss why timely AWS EBS snapshots are so important for data recovery and give you a step-by-step walkthrough on how to create automated AWS snapshots using the AWS Backup service.

To get started right away, click the links below:

- [Automated Backups to the Rescue](https://bluexp.netapp.com/blog/ebs-volumes-backup-automation#H_H1)
- [How to Set Up an AWS Backup Plan for EBS Volumes](https://bluexp.netapp.com/blog/ebs-volumes-backup-automation#H_H2)
- [Get More Backup Protection for EBS with Cloud Volumes ONTAP](https://bluexp.netapp.com/blog/ebs-volumes-backup-automation#H_H3)

## Automated Backups to the Rescue

How do automated backups work in practice? Let’s consider an e-commerce website running on the public cloud. As an online business with sales taking place globally, the website runs 24x7 on an highly available infrastructure without tolerance for any downtime.

This is a perfect case in which automating the backup of the database instance would prevent the loss of data. Automated backups make sure you are prepared for any kind of outages or failure states, including [disaster recovery scenarios](https://bluexp.netapp.com/solutions/cloud-disaster-recovery). 

For the recovery of an application, recovery time objective (RTO) and recovery point objective (RPO) are two very significant parameters. The recovery time objective (RTO) is the maximum outage that is allowed on your application. For applications with zero RTO, the SLA is zero downtime. Practically, this is a very tough situation, but to achieve even 99% of that result, the redundant copies of data and the highly available infrastructure must be able to guarantee almost zero downtime. 

The recovery point objective (RPO) indicates the amount of data that will be lost in the event of a system failure.

For example, say there is an application set up to take EBS snapshots every four hours, and then that system goes down. The data stored in the EBS volume since its last EBS volume backup is not recoverable in this case. The RPO in this case is four hours.

The RPO and RTO are inversely proportional to the money spent on your infrastructure. If your RPO and RTO are low, you have to ensure that you have an appropriate backup and data recovery strategy in place.

One of the best ways to do this is to prepare a timely backup of the EBS of the EC2 instance to which that EBS is connected. The EBS snapshot is stored on Amazon Simple Storage Service (S3) and can be used later to recover the database instance. 

There are a number of methods to automatically create EBS snapshots that can be used for recovery. Currently AWS Backup is the preferred solution. AWS Backup is a fully managed service that not only protects EBS volumes, but also offers backup capabilities for EC2 instances, Amazon RDS, Storage Gateway, DynamoDB, EFS, and Aurora.

Below, we will give an example of how you can create a scheduled snapshot of one or more EBS volumes using AWS Backup.

## How to Set Up an AWS Backup Plan for EBS Volumes

In this section we’ll take a look at how to use AWS Backup to automatically create snapshots of EBS volumes. The following procedure demonstrates how to set up a backup plan, a rule, and a single resource to be backed up.

The only prerequisite for this example is that you should have an EBS volume ready and available to be backed up as a resource that you will connect to your backup plan.

1. Log in to the AWS Management console and select the AWS Backup service.
   
   ![Select the AWS Backup service](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_1.png?width=600&name=blog_CVO_220_aws_backup_1.png)
2. In the dashboard, the choices are to “Manage Backup plans,” “Create an on-demand backup” and “Restore a backup.” Since we are going to create a backup plan, select “Manage Backup plans.”
   
   ![Manage Backup plans](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_2.png?width=600&name=blog_CVO_220_aws_backup_2.png)
3. In the Backup plans window, select “Create Backup plan” since we have no plans in place yet.
   
   ![Create backup plan](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_3.png?width=600&name=blog_CVO_220_aws_backup_3.png)
4. In the “Create Backup plan” window, there are options to use a template, create a new plan from scratch, or define a plan using a JSON file. Since this is our first plan, we want to start off easy by using an existing template. Select “Start with a template.”
   
   ![Start with a template under the 'Create Backup plan' window](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_4.png?width=600&name=blog_CVO_220_aws_backup_4.png)
5. We click the “Choose template” bar and pick the very first template: Daily-35day-Retention. This means that one snapshot will be created every day and each of those snapshots are kept for 35 days before being deleted.
   
   In the “Backup plan name,” enter a name for your plan. In this example we used “testplan.”
   
   ![Create a backup plan](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_6.png?width=600&name=blog_CVO_220_aws_backup_6.png)
6. Now scroll down a little bit and select “DailyBackups” as the backup rule. Click “Create Plan” at the bottom of the page.
   
   ![DailyBackups ](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_7.png?width=600&name=blog_CVO_220_aws_backup_7.png)
7. Your backup plan will now be created. Next, you can add resources to the plan. Click “Assign resources” in the top right hand corner.
   
   ![Assign resources in your backup plan](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_8.png?width=600&name=blog_CVO_220_aws_backup_8.png)
8. On the Assign Resources screen, give the resource assignment a name. In the “assign by” pull down menu, select “resource-id.”
   
   ![Select "resource-id" in the assign resources section](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_9.png?width=600&name=blog_CVO_220_aws_backup_9.png)
9. For resource type, select EBS. For value, select your one and only volume. To continue, click the “Assign resources” button.
   
   ![Assign resources](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_10.png?width=600&name=blog_CVO_220_aws_backup_10.png)
10. You’ll now see that the resource has been added to the plan.
    
    ![Resource assignment has been created successfully](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_11.png?width=600&name=blog_CVO_220_aws_backup_11.png)
11. For the final step, click on the “DailyBackups” rule once more and see the list summary of the rule you created. You’ll see that we are going to create a snapshot every day at 5:00 AM, and keep every snapshot for 5 weeks.
    
    ![DailyBackups](https://bluexp.netapp.com/hs-fs/hubfs/blog_CVO_220_aws_backup_12.png?width=600&name=blog_CVO_220_aws_backup_12.png)

## Get More Backup Protection for EBS with Cloud Volumes ONTAP

Now that you’ve seen how to create and automate your AWS EBS snapshot copies, you need to consider how those snapshots will be stored in the future. [Amazon EBS snapshots are stored on Amazon S3](https://bluexp.netapp.com/blog/aws-cvo-blg-ebs-to-s3-streamlining-data-on-aws), where costs are lower, but that storage service can’t be accessed as other data that is stored in Amazon S3 buckets. This can be somewhat limiting for a user who may want to gain access to those snapshots. The snapshots are also created without any storage efficiency, which means the copies take up storage space that AWS will sell to you for a charge.

[Cloud Volumes ONTAP](https://bluexp.netapp.com/blog/lowering-cloud-data-storage-costs-with-ontap-cloud) offers enhanced data protection capabilities that can address these concerns. First and foremost, [NetApp Snapshot technology offers a faster, more space-efficient backup](https://bluexp.netapp.com/blog/snapshots-technology-cloud-volumes) for Amazon EBS volume data. Plus,[ automatic data storage tiering](https://bluexp.netapp.com/blog/how-storage-tiering-works-in-aws-and-azure) allows you to tier snapshot and other infrequently used data between Amazon EBS and less-expensive Amazon S3 as determined by the data’s usage pattern. Cloud Volumes ONTAP also has powerful storage efficiencies that can[ lower your overall cloud data storage costs](https://bluexp.netapp.com/blog/lowering-cloud-data-storage-costs-with-ontap-cloud), and[ FlexClone® data cloning](https://bluexp.netapp.com/blog/automated-data-cloning-for-cloud-based-testing) to create instant, zero-cost, writable data clones from snapshots, leveraging backups for dev/test purposes.

[![New call-to-action](https://no-cache.hubspot.com/cta/default/525875/06bfb4b7-a3c9-44d9-a1b7-8bd65ac245fd.png)](https://cta-redirect.hubspot.com/cta/redirect/525875/06bfb4b7-a3c9-44d9-a1b7-8bd65ac245fd)

![Gali Kovacs](https://bluexp.netapp.com/hs-fs/hubfs/1516229290971.jpeg?width=75&height=75&name=1516229290971.jpeg)

[Gali Kovacs](https://bluexp.netapp.com/blog/author/gali-kovacs)

<https://bluexp.netapp.com/blog/author/gali-kovacs>

-

```json
{
  "@context" : "https://schema.org",
  "@type" : "FAQPage",
  "mainEntity" : [ {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "<p>In this section we’ll take a look at how to use AWS Backup to automatically create snapshots of EBS volumes. The following procedure demonstrates how to set up a backup plan, a rule, and a single resource to be backed up.</p><p>The only prerequisite for this example is that you should have an EBS volume ready and available to be backed up as a resource that you will connect to your backup plan.</p><p><a href='https://cloud.netapp.com/blog/ebs-volumes-backup-automation#H_H2'>Read more about How to Set Up an AWS Backup Plan for EBS Volumes</a></p>"
    },
    "name" : "How to Set Up an AWS Backup Plan for EBS Volumes?"
  } ]
}
```

```json
{
  "@context" : "https://schema.org/",
  "@type" : "HowTo",
  "description" : "Understand why timely AWS EBS snapshots are so important for data recovery. Also, we will show you how to automate Amazon EBS volume backup using AWS CLI.",
  "name" : "AWS EBS Volume Backup with EBS Snapshots",
  "step" : [ {
    "@type" : "HowToStep",
    "name" : "Tag Your EBS Instances",
    "text" : "Tag Your EBS Instances- Tagging is very useful in a situation where you have hundreds of instances running. Tagging lets you appropriate unique tags for resources. For example, out of 30 instances, ten of them can be tagged “Production,” ten more tagged “UAT,” and the remaining ten tagged “QA.”",
    "url" : "https://cloud.netapp.com/blog/ebs-volumes-backup-automation"
  }, {
    "@type" : "HowToStep",
    "name" : "Creating Snapshot Permissions",
    "text" : "Creating Snapshot Permissions- To take EC2 Snapshots, the EC2 instance should be provided access to communicate with the AWS resources. The best way to do this is to create a small EC2 instance on which the script will run in the background.",
    "url" : "https://cloud.netapp.com/blog/ebs-volumes-backup-automation"
  }, {
    "@type" : "HowToStep",
    "name" : "Scripting",
    "text" : "Scripting- First, it finds the list of volumes with the tag “Production.” Then, the list is iterated and the instance name to which the volume is attached is found. Next, it finds the name tag of the instance. It finds the device block of the volume whose snapshot is to be taken. It then creates the snapshot of the volume with the description of the instance name. You should now have your snapshot.",
    "url" : "https://drive.google.com/open?id=0B_i6vDoecuJ9em45OE5BWkFHVjQ"
  }, {
    "@type" : "HowToStep",
    "name" : "Automating the Backup",
    "text" : "Automating the Backup- Now that the script is prepared, we want to run it automatically every 15 minutes. To make this happen, you will need to create an entry in crontab.",
    "url" : "https://cloud.netapp.com/blog/ebs-volumes-backup-automation"
  } ],
  "supply" : {
    "@type" : "HowToSupply",
    "name" : "AWS EBS"
  },
  "tool" : {
    "@type" : "HowToTool",
    "name" : "EBS Snapshot"
  },
  "totalTime" : "PT6M"
}
```