How to Back Up VMs to Amazon EBS in EC2

VM backup to cloud is one of the best solutions for a complete data protection cycle. This is where NAKIVO Backup & Replication is of great help, as it supports backing up VMs to clouds, like AWS. A simple scheme of backing up data to the cloud with NAKIVO Backup & Replication looks like this:

VM backup to cloud

There are several ways to perform a backup to AWS cloud using NAKIVO Backup & Replication:

  1. Backup to Amazon EBS in EC2 with NAKIVO Backup & Replication
  2. Backup to Amazon S3 via Storage Gateway with NAKIVO Backup & Replication

In this post, let’s consider the first method.

Backup to Amazon EBS in EC2 with NAKIVO Backup & Replication

Amazon Elastic Block Store (Amazon EBS) is a persistent block storage for Amazon EC2 instances. NAKIVO Backup & Replication can create a backup repository in AWS by using multiple Amazon EBS volumes. The EBS volumes can be attached to any AWS instance and must be in the same zone with this instance. EBS volumes are persisted independently from the life of AWS instance to which they were attached. Thus, Amazon EBS is the best choice, if you need long-term safekeeping and quick access to your data.

So, how do we, actually, create a backup repository in Amazon EBS?

First off, you need to create and download AWS Access Key ID and Secret Access Key. These are used by NAKIVO Backup & Replication to work with your EC2 instances and EBS volumes. To create an AWS Access Key ID and Secret Access Key, do the following:

  1. If you don’t have an AWS account, create a new one at https://aws.amazon.com.
  2. Open the IAM console.
  3. In the left pane, click Users.
  4. Click your IAM user name (not the check box).
  5. Go to the Security Credentials tab and then click Create Access Key.
  6. Click Download Credentials, and store the keys in a secure location.

After you have created and downloaded the keys, do the following:

Step 1

  1. Log in to the product’s web interface, then go to the Configuration dashboard.

    Configuration dashboard
  2. In the Inventory tab, click Add New…

    Inventory
  3. Choose AWS account.

    AWS account
  4. Fill out the fields:

    • Display name: Enter the AWS account name, which will be displayed in the Inventory tab;
    • Type: Choose AWS account;
    • AWS access key ID: Enter the access key ID of your AWS account;
    • Secret access key: Enter the secret access key of your AWS account;
  5. Click Add.

    Add New AWS Account

If everything is correct, you will see a new AWS account with the name you have chosen in the Inventory tab. In our case, it is named “AWS”.

Added AWS account

Step 2

In this step, you need to deploy a Transporter in AWS. The Transporter is an application which performs all of the tasks related to data protection and recovery. You can learn more about Transporters in our article NAKIVO Backup & Replication Components: Transporter.

To add a transporter

  1. Go to the Transporters tab and click Add Transporter.

    Transporters tab
  2. Choose Deploy new transporter (AWS EC2).

    Deploy new transporter (AWS EC2)
  3. Fill out the fields and specify parameters:

    • Transporter name: Enter the name of the transporter
    • Transporter type: Choose Amazon EC2
    • Region: Select the target region for your Amazon AWS instance

      NOTE: To select the proper target region, consider the location from which you are going to make backups. Select the closest region, if you need faster data transfer speed, or the furthest region, if you want to protect against potential data loss due to a disaster.

      Deploying AWS transporter part 1
    • Instance type: Select an instance type from the list. More powerful instance types, such as t2.medium, can process data faster, but will cost more.

      Deploying AWS transporter part 2
  4. After filling out the required fields, click More options:

    Deploying AWS transporter part 3

    You will see the list of extended options of AWS transporter configuration. These are:

    • Allowed traffic from: To improve security, you can specify one or more IP address ranges (CIDR), which will be able to connect to your Amazon instance. (All of the necessary ports will be opened automatically.) If you leave default values, any and all IPs will be allowed, which means anyone will be able to access your transporter. For security purposes, restrict the traffic only to trusted IP addresses.

    • Operation mode: Here you need to select a preferable transporter operation mode. Select Always running.

      Deploying AWS transporter part 4
  5. Click Deploy.

    Deploying AWS transporter part 5

    If everything is correct, you will see a new AWS transporter with the name you specified above. In our case, it is EC2 EU (Ireland).

    Deploying AWS transporter part 6

Step 3

On this step, we will create a new backup repository.

  1. Go to the Repositories tab and click Add Backup Repository.

    Repositories tab
  2. Choose Create new backup repository.

    Create new backup repository
  3. Fill out the fields and specify parameters:

    • Name: Enter the name of the repository;
    • Assigned transporter: Choose the previously created AWS transporter (in our case, its EC2 EU (Ireland). The backup repository will be created in the same region where the transporter is located;
    • Type: Choose Amazon EBS;
    • Volume type: Select a preferable EBS volume type

      NOTE: Cold HDD (sc1) is the cheapest volume type. For actual volume capabilities and prices, see Amazon AWS Documentation;

    • Storage (GB): Enter the amount of disc space (in GB) to be used for the backup repository.
  4. Click Create:

    Backup Repository: Amazon EBS

If everything is correct, you will see a new backup repository in the Repositories tab, with the name you specified (that is, AWS EC2 repo).

Successfully created AWS backup repository

Now you have a backup repository in the cloud. The best practice would be to create VM backups locally, and then set up a Backup Copy job that would copy your local backups to the cloud:

Choose the previously created backup repository

This way you will have a local backup for fast operational recovery and a copy in the cloud for disaster recovery. This approach is also more cost-effective than direct backup to cloud, consumes less WAN bandwidth, and needs less I/O operations in your Amazon AWS account.

Thoughts

Backing up data to AWS cloud cuts your costs and saves your time spent on building and maintaining an offsite backup infrastructure. Moreover, you get all benefits provided by the Amazon cloud, such as high-level security, almost 100% uptime guaranteed by Amazon (which is defined in the SLA), and the exact amount of storage space you need. To save costs and eliminate the need to wait for backups to be performed via a slow WAN, you can choose to copy cumulative weekly backups to AWS instead.

In our next article, we will describe another method to perform backups to AWS cloud with NAKIVO Backup & Replication – VM backup to Amazon S3 via Storage Gateway. So, stay tuned for our Blog updates!

Share:

LinkedIn Google+