Elastic Cloud Gate

AWS Blog

How to create and maintain RDS backups

Using Amazon AWS Management Console you can create two types of RDS snapshots:

  • Automated Backup
  • DB Snapshot

Automated backup – is the backup executed based on the daily schedule that enables point-in-time recovery of your DB Instance.
DB Snapshot – enables you to back up your DB Instance in a known state. The backup is executed manually from AWS console.

The Automated backup can be setup when the new RDS DB Instance is launched.
To do this, under “Management Options” section check “Enable Automatic Backup.”

In addition you can specify the following:

  • Retention Period, which defines from how many days you want to keep your RDS backups. The value can range from 0 (for no backup retention) to a maximum of 35 days.
  • Backup Window is the user-defined period of time during which your DB Instance is backed up. If you don’t have preference you can simply check “No Preference.”

RDS Backup and Maintenance

You can modify these options after DB Instance was already launched.
To do this, under “Instances” select instance and from the “Instance Actions” select “Modify.”

RDS Backup and Maintenance

To take DB Snapshot manually:

  1. Select DB Instance and from “Instance Actions” menu select “Take DB Snapshot”

    RDS Backup and Maintenance
  2. Type “Snapshot Name” and click “Yes, Take Snapshot”

    RDS Backup and Maintenance

As we mentioned above, AWS allows maximum of 35 days for backup period.
If you need to keep backup from more than 35 days or need more advanced scheduler with more flexibility in execution time as well as retention period, here are the steps of how you can achieve it using Elastic Cloud Gate console:

  1. Go to RDS section and from the menu select “Schedule”

    RDS Backup and Maintenance
  2. In the upper section of the RDS Scheduler, chose how frequently you want to create DB Snapshot

    Occurrence:

    • Hourly – The snapshot will be taken every given number of hours. In addition you can specify start and end time. For instance, if you want to take a snapshot every 2 hours between 8AM and 7PM, the setup would look like this:

      RDS Backup and Maintenance

      If you skip the start and end time, the snapshot will be taken every given number of hours around the clock.
    • Daily – DB Snapshot will be taken every selected day and time. For instance, to take a snapshot every Monday, Wednesday and Friday at 9PM, the setup would look like this:

      RDS Backup and Maintenance
    • Monthly – DB Snapshot will be taken every given day of the month at given time. For example, to take a snapshot every 3rd day of the month at 8AM, the setup would look like this:

      RDS Backup and Maintenance

    You can setup multiple schedulers for the same RDS instance and mix different frequencies if needed. For instance, to take a snapshot every hour from 9AM to 5PM and another one daily at 11PM.

    RDS Backup and Maintenance

  3. In the next section you can change the following settings:
    • Description – the description of the DB snapshot.
    • “Copy Snapshot to Different Region” – when checked, this option will copy the new DB Snapshot to the selected AWS region. You can select multiple destination regions. DB Snapshot will be copied to all AWS regions simultaneously.

    RDS Backup and Maintenance

Amazon AWS allows to keep only up to 50 manual snapshots. So, when you use our scheduler after a while you might get an error “cannot create more than 50 manual snapshots.” To prevent this, you can schedule retention of the old DB Snapshots.

To schedule Maintenance (retention period) of the old DB Snapshots:

  1. There are two options allowing to define which DB Snapshot should not be deleted:
    • “Keep All From Last” – this option will keep all DB Snapshots created within the last x periods (period can be selected as hours, days, weeks, months or years). For example, if you want to keep all DN Snapshots created within the last 45 days, you setup would look like this:

      RDS Backup and Maintenance
    • “Keep One Per Period From Last” – this option will only keep the DB Snapshots created last in the given period (i.e. hours, days, weeks, months or years). For instance, if you want to keep one DB Snapshot per week from the last 8 weeks, the setup would look like this:

      RDS Backup and Maintenance

    All DB Snapshots which do not match scheduler will be deleted.

  2. You can setup advanced maintenance plan for RDS by creating multiple schedules. For example, to setup maintenance that would keep all DB Snapshots from the last 7 days, 1 DB Snapshot per week from the last 4 weeks and 1 DB Snapshot per month from the last 4 months, the setup would look like this:

    RDS Backup and Maintenance

To see other features offered by Elastic Cloud Gate related to RDS visit: https://www.ecloudgate.com/Tour/RDS

, ,

Leave a Reply