Skip to content

AWS Backup - when backup plan with multiple rules and the time frames of the two rules overlap

0

My goal is to backup EC2 instance every hour and also every 12 hrs , the 12 hr backup being retained for long term. I am reading this doc on AWS backup https://docs.aws.amazon.com/aws-backup/latest/devguide/plan-options-and-configuration.html I created one backup plan with two backup rules -

  1. rule1: frequency: 1hr , start within: 1 hr, complete within: 2 hrs, total retention period : 1 day
  2. rule2: frequency: 12hr , start within: 8 hr, complete within: 9 hrs, total retention period : 2 days I see the hourly job will not run until the eight hrs after the 12-hr job start time This behavior is mentioned in the doc I referred under note - "If you have a backup plan with multiple rules and the time frames of the two rules overlap, AWS Backup optimizes the backup and takes a backup for the rule with the longer retention time. The optimization takes into account the full start window, not just when the daily backup is taken."

**Question: **How can I use AWS backup to take backup (of Ec2 ) every hour without fail while also having daily and weekly backups

asked 9 months ago334 views
1 Answer
0
Accepted Answer

When you have multiple backup rules in a single backup plan with overlapping time frames, AWS Backup optimizes by prioritizing the rule with the longer retention period. This is why your hourly backups aren't running during the 8-hour start window of your 12-hour backup rule.

To achieve your goal of hourly backups without interruption while also maintaining daily and weekly backups with longer retention periods, you should create separate backup plans rather than multiple rules in a single plan. This approach avoids the optimization behavior that's preventing your hourly backups during the overlap period.

Create three separate backup plans:

  1. Hourly backup plan: One rule with 1-hour frequency and 1-day retention
  2. Daily backup plan: One rule with 12-hour or 24-hour frequency and longer retention (e.g., 7 days or 30 days)
  3. Weekly backup plan: One rule with weekly frequency and even longer retention

By separating these into different backup plans rather than rules within a single plan, you'll avoid the optimization behavior where AWS Backup prioritizes the rule with the longer retention period during overlapping windows. Each plan will run independently according to its schedule, ensuring your hourly backups continue without interruption.

This approach will create separate backup jobs for each plan, allowing you to have the frequent recovery points you need for short-term recovery as well as the longer-term backups for extended retention requirements.
Sources
Backup plan options and configuration - AWS Backup

answered 9 months ago
EXPERT
reviewed 9 months ago
  • I wonder what is the real use case for multiple backup rules as part of a backup plan though.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.