3. Creating a Simple Backup Policy

In this section we'll show you how to start backing up EC2 instances by creating a simple backup policy.

3.1 Adding an AWS Account

After logging in the system for the first time, you will see the main screen:

3. Creating a Simple Backup Policy
Figure 3-1

It is currently empty. The first thing you will need to do is to associate an AWS account so you can start backing up EC2 instances. Depending on the edition of CPM you registered to, you can associate one or more AWS accounts. Click the Accounts button in the top panel and then click Add New Account.

3. Creating a Simple Backup Policy
Figure 3-2
3. Creating a Simple Backup Policy
Figure 3-3

In the Add New Account screen (Figure 3‑3):

  1. In the Name box, type the name you would like to associate to your primary AWS account.
  2. In the Account Type list, select Backup. DR accounts relate to cross-account backup and recovery and are out of the scope of this guide. See the CPM User Guide.
  3. In the Authentication list, select your desired type of authentication. You can either choose to use your AWS access key and secret key or CPM Instance IAM Role, which is recommended. These credentials are saved in the CPM database. However, the secret key is kept in an encrypted form. There is no way these credentials will ever appear in clear text format anywhere. See “Security Concerns and Best Practices” in the CPM User Guide.
  4. In the Capture VPCs list, select Disabled to turn off automatic capturing of VPCs for this account.

3.2 Creating a simple backup schedule

Click the Home button to go back to the main screen and then click the Schedules tab. Currently, the list of schedules is empty.

3. Creating a Simple Backup Policy
Figure 3-4

You will now create the first schedule. Click New Schedule and then enter a schedule name and description:

3. Creating a Simple Backup Policy
Figure 3-5

You can also set the start time of this schedule and the frequency. Available units are minutes, hours, days, weeks and months. The default End Time is never. Click the End Time link to modify.

3.3 Creating a simple backup policy

Click the Home button to go back to the main screen and then click the Policies tab. Currently, the list of policies is empty. You will now create the first policy. Click New Policy.

3. Creating a Simple Backup Policy

In the Policy page, enter a policy name and description:

3. Creating a Simple Backup Policy
Figure 3-6

Other fields in this screen (Figure 3‑6) include:

  • Account – Each policy can be associated with one AWS account.
  • Auto Target Removal – Whether to auto-remove resources that no longer exist.
  • Generations to Save – Number of backups of this policy you want to keep. Older backups will be automatically deleted.
  • Status – By default a policy is enabled.
  • Schedules – Select the schedule you just created.

When finished, click Apply and select the Policies tab.

3. Creating a Simple Backup Policy
Figure 3-7

When looking at this screen, you can see there are several things you can do with a policy. To edit the basic policy definition, click the link of the policy’s name.

To configure the policy, you have three buttons:

  • Backup Targets – Defines the actual resource objects this policy will back up.
  • More Options – Defines Linux scripts and settings for the definition of a successful backup and retry parameters.
  • DR – Defines disaster recovery options.

Click the Backup Targets button:

3. Creating a Simple Backup Policy
Figure 3-8

As you can see in Figure 3‑8, there are numerous types of objects you can back up:

  • Instances – Back up EC2 instances, including their metadata, and optionally some or all of their data volumes. This is the most common backup target.
  • Volumes – Back up EBS volumes independently, whether or not they are attached to an instance, and regardless of which instance they are attached to. This can be useful to back up volumes which are not always attached to an instance, or volumes that move between instances, like cluster volumes.
  • RDS Databases – Back up RDS DB instances. This will use RDS snapshots and can be useful for backing up RDS databases together with other types of objects, or for anyone who wishes to backup RDS databases using CPM, in addition to or instead of using AWS automatic backup.
  • Aurora Clusters – Aurora is similar to RDS but handles Aurora clusters.
  • Redshift Clusters – Manage Redshift Cluster snapshots.
  • DynamoDB Tables – Back up DynamoDB Tables.

To add an instance, for example, to the policy:

Click Add Instances. The list of instances (see Figure 3‑9) you have in the policy’s account appears. The Choose Region list allows you to switch between different regions. You can use the free text search, column-based sorting, or pagination if there are a lot of instances and you are seeking a specific one.

Note: Although you can add backup objects from different regions in the same policy, in many cases it is not a good practice to do so.

3. Creating a Simple Backup Policy
Figure 3-9

Select an instance you want to back up and click Add Selected. This will add the requested instance to the screen in the background and remove it from the popup window, although it does not close the popup. You can add as many instances as you want up to the limit of your licence. Click Close when finished.

Back in the Backup Targets screen, you can see the instance on the list of instances. You have buttons to remove it from the policy and a Configure button.

By default, all EBS volumes which are attached to this instance will be backed up. If a volume gets detached from or attached to the instance, it will not interfere with the normal operations of the policy. In every backup, CPM will check which volumes are attached to the instance and take snapshots of them. Click Home and go to the Policies tab again. In the Schedules column of the policy, click the backup times link. You will see the planned backups for this policy.

The backups will start automatically at the time configured previously in the schedule.

If you want to initiate an immediate backup, click run ASAP in the Operations column.

3. Creating a Simple Backup Policy

CPM will report that the backup policy will now run:

3. Creating a Simple Backup Policy

This process can be monitored in Status column of the Backup Monitor tab.

3. Creating a Simple Backup Policy

Consult the CPM User Guide to see how to create application consistency for Linux and Windows servers.

Share this post →