Overview of backing up and restoring an Aurora DB cluster - Amazon Aurora

Overview of backing up and restoring an Aurora DB cluster

The following topics describe Aurora backups and how to restore your Aurora DB cluster.

Backups

Aurora backs up your cluster volume automatically and retains restore data for the length of the backup retention period. Aurora automated backups are continuous and incremental, so you can quickly restore to any point within the backup retention period. No performance impact or interruption of database service occurs as backup data is being written. You can specify a backup retention period from 1–35 days when you create or modify a DB cluster. Aurora automated backups are stored in Amazon S3.

If you want to retain data beyond the backup retention period, you can take a snapshot of the data in your cluster volume. Aurora DB cluster snapshots don't expire. You can create a new DB cluster from the snapshot. For more information, see Creating a DB cluster snapshot.

Note
  • For Amazon Aurora DB clusters, the default backup retention period is one day regardless of how the DB cluster is created.

  • You can't disable automated backups on Aurora. The backup retention period for Aurora is managed by the DB cluster.

Your costs for backup storage depend upon the amount of Aurora backup and snapshot data you keep and how long you keep it. For information about the storage associated with Aurora backups and snapshots, see Understanding Amazon Aurora backup storage usage. For pricing information about Aurora backup storage, see Amazon RDS for Aurora pricing. After the Aurora cluster associated with a snapshot is deleted, storing that snapshot incurs the standard backup storage charges for Aurora.

Using AWS Backup

You can use AWS Backup to manage backups of Amazon Aurora DB clusters.

Snapshots managed by AWS Backup are considered manual DB cluster snapshots, but don't count toward the DB cluster snapshot quota for Aurora. Snapshots that were created with AWS Backup have names with awsbackup:job-AWS-Backup-job-number. For more information about AWS Backup, see the AWS Backup Developer Guide.

You can also use AWS Backup to manage automated backups of Amazon Aurora DB clusters. If your DB cluster is associated with a backup plan in AWS Backup, you can use that backup plan for point-in-time recovery. Automated (continuous) backups that are managed by AWS Backup have names with continuous:cluster-AWS-Backup-job-number. For more information, see Restoring a DB cluster to a specified time using AWS Backup.

Backup window

Automated backups occur daily during the preferred backup window. If the backup requires more time than allotted to the backup window, the backup continues after the window ends, until it finishes. The backup window can't overlap with the weekly maintenance window for the DB cluster.

Aurora automated backups are continuous and incremental, but the backup window is used to create a daily system backup that is preserved within the backup retention period. You can copy the backup to preserve it outside of the retention period.

Note

When you create a DB cluster using the AWS Management Console, you can't specify a backup window. However, you can specify a backup window when you create a DB cluster using the AWS CLI or RDS API.

If you don't specify a preferred backup window when you create the DB cluster, Aurora assigns a default 30-minute backup window. This window is selected at random from an 8-hour block of time for each AWS Region. The following table lists the time blocks for each AWS Region from which the default backup windows are assigned.

Region Name Region Time Block
US East (Ohio) us-east-2 03:00–11:00 UTC
US East (N. Virginia) us-east-1 03:00–11:00 UTC
US West (N. California) us-west-1 06:00–14:00 UTC
US West (Oregon) us-west-2 06:00–14:00 UTC
Africa (Cape Town) af-south-1 03:00–11:00 UTC
Asia Pacific (Hong Kong) ap-east-1 06:00–14:00 UTC
Asia Pacific (Hyderabad) ap-south-2 06:30–14:30 UTC
Asia Pacific (Jakarta) ap-southeast-3 08:00–16:00 UTC
Asia Pacific (Melbourne) ap-southeast-4 11:00–19:00 UTC
Asia Pacific (Mumbai) ap-south-1 16:30–00:30 UTC
Asia Pacific (Osaka) ap-northeast-3 00:00–08:00 UTC
Asia Pacific (Seoul) ap-northeast-2 13:00–21:00 UTC
Asia Pacific (Singapore) ap-southeast-1 14:00–22:00 UTC
Asia Pacific (Sydney) ap-southeast-2 12:00–20:00 UTC
Asia Pacific (Tokyo) ap-northeast-1 13:00–21:00 UTC
Canada (Central) ca-central-1 03:00–11:00 UTC
Canada West (Calgary) ca-west-1 18:00–02:00 UTC
China (Beijing) cn-north-1 06:00–14:00 UTC
China (Ningxia) cn-northwest-1 06:00–14:00 UTC
Europe (Frankfurt) eu-central-1 20:00–04:00 UTC
Europe (Ireland) eu-west-1 22:00–06:00 UTC
Europe (London) eu-west-2 22:00–06:00 UTC
Europe (Milan) eu-south-1 02:00–10:00 UTC
Europe (Paris) eu-west-3 07:29–14:29 UTC
Europe (Spain) eu-south-2 02:00–10:00 UTC
Europe (Stockholm) eu-north-1 23:00–07:00 UTC
Europe (Zurich) eu-central-2 02:00–10:00 UTC
Israel (Tel Aviv) il-central-1 03:00–11:00 UTC
Middle East (Bahrain) me-south-1 06:00–14:00 UTC
Middle East (UAE) me-central-1 05:00–13:00 UTC
South America (São Paulo) sa-east-1 23:00–07:00 UTC
AWS GovCloud (US-East) us-gov-east-1 17:00–01:00 UTC
AWS GovCloud (US-West) us-gov-west-1 06:00–14:00 UTC

Retaining automated backups

When you delete a provisioned or Aurora Serverless v2 DB cluster, you can retain automated backups. This allows you to restore a DB cluster to a specific point in time within the backup retention period, even after the cluster is deleted.

Retained automated backups contain system snapshots and transaction logs from a DB cluster. They also include DB cluster properties, such as DB instance class, which are required to restore it to an active cluster.

You can restore or remove retained automated backups using the AWS Management Console, RDS API, and AWS CLI.

Note

You can't retain automated backups for Aurora Serverless v1 DB clusters.

Retention period

The system snapshots and transaction logs in a retained automated backup expire the same way that they expire for the source DB cluster. The settings for the retention period of the source cluster also apply to the automated backups. Because no new snapshots or logs are created for this cluster, the retained automated backups eventually expire completely. After the retention period is over, you continue to retain manual DB cluster snapshots, but all of the automated backups expire.

You can remove retained automated backups using the console, AWS CLI or RDS API. For more information, see Deleting retained automated backups.

Unlike a retained automated backup, a final snapshot doesn't expire. We strongly suggest that you take a final snapshot even if you retain automated backups, because the retained automated backups eventually expire.

Viewing retained backups

To view your retained automated backups in the RDS console, choose Automated backups in the navigation pane, then choose Retained. To view individual snapshots associated with a retained automated backup, choose Snapshots in the navigation pane. Alternatively, you can describe individual snapshots associated with a retained automated backup. From there, you can restore a DB instance directly from one of those snapshots.

To describe your retained automated backups using the AWS CLI, use the following command:

aws rds describe-db-cluster-automated-backups --db-cluster-resource-id DB_cluster_resource_ID

To describe your retained automated backups using the RDS API, call the DescribeDBClusterAutomatedBackups action with the DbClusterResourceId parameter.

Retention costs

There is no additional charge for backup storage of up to 100% of your total Aurora database storage for each Aurora DB cluster. There is also no additional charge up to one day when you retain automated backups after deleting a DB cluster. Backups that you retain for more than one day are charged.

There is no additional charge for transaction logs or instance metadata. All other pricing rules for backups apply to restorable clusters. For more information, see the Amazon Aurora pricing page.

Limitations

The following limitations apply to retained automated backups:

  • The maximum number of retained automated backups in one AWS Region is 40. It's not included in the quota for DB clusters. You can have up to 40 running DB clusters, 40 running DB instances, and 40 retained automated backups for DB clusters at the same time.

    For more information, see Quotas in Amazon Aurora.

  • Retained automated backups don't contain information about parameters or option groups.

  • You can restore a deleted cluster to a point in time that is within the retention period at the time of deletion.

  • You can't modify a retained automated backup because it consists of system backups, transaction logs, and the DB cluster properties that existed at the time that you deleted the source cluster.

Deleting retained automated backups

You can delete retained automated backups when they are no longer needed.

To delete a retained automated backup
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Automated backups.

  3. Choose the Retained tab.

    
                                    Retained automated backups
  4. Choose the retained automated backup that you want to delete.

  5. For Actions, choose Delete.

  6. On the confirmation page, enter delete me and choose Delete.

You can delete a retained automated backup by using the AWS CLI command delete-db-cluster-automated-backup with the following option:

  • --db-cluster-resource-id – The resource identifier for the source DB cluster.

    You can find the resource identifier for the source DB cluster of a retained automated backup by running the AWS CLI command describe-db-cluster-automated-backups.

This example deletes the retained automated backup for the source DB cluster that has the resource ID cluster-123ABCEXAMPLE.

For Linux, macOS, or Unix:

aws rds delete-db-cluster-automated-backup \ --db-cluster-resource-id cluster-123ABCEXAMPLE

For Windows:

aws rds delete-db-cluster-automated-backup ^ --db-cluster-resource-id cluster-123ABCEXAMPLE

You can delete a retained automated backup by using the Amazon RDS API operation DeleteDBClusterAutomatedBackup with the following parameter:

  • DbClusterResourceId – The resource identifier for the source DB cluster.

    You can find the resource identifier for the source DB instance of a retained automated backup using the Amazon RDS API operation DescribeDBClusterAutomatedBackups.

Restoring data

You can recover your data by creating a new Aurora DB cluster from the backup data that Aurora retains, from a DB cluster snapshot that you have saved, or from a retained automated backup. You can quickly restore a new copy of a DB cluster created from backup data to any point in time during your backup retention period. Because Aurora backups are continuous and incremental during the backup retention period, you don't need to take frequent snapshots of your data to improve restore times.

The latest restorable time for a DB cluster is the most recent point to which you can restore your DB cluster. This is typically within 5 minutes of the current time for an active DB cluster, or 5 minutes of the cluster deletion time for a retained automated backup.

The earliest restorable time specifies how far back within the backup retention period that you can restore your cluster volume.

To determine the latest or earliest restorable time for a DB cluster, look for the Latest restorable time or Earliest restorable time values on the RDS console. For information about viewing these values, see Viewing retained backups.

You can determine when the restore of a DB cluster is complete by checking the Latest restorable time and Earliest restorable time values. These values return NULL until the restore operation is complete. You can't request a backup or restore operation if either Latest restorable time or Earliest restorable time returns NULL.

For information about restoring a DB cluster to a specified time, see Restoring a DB cluster to a specified time.

Database cloning for Aurora

You can also use database cloning to clone the databases of your Aurora DB cluster to a new DB cluster, instead of restoring a DB cluster snapshot. The clone databases use only minimal additional space when first created. Data is copied only as data changes, either on the source databases or on the clone databases. You can make multiple clones from the same DB cluster, or create additional clones even from other clones. For more information, see Cloning a volume for an Amazon Aurora DB cluster.

Backtrack

Aurora MySQL now supports "rewinding" a DB cluster to a specific time, without restoring data from a backup. For more information, see Backtracking an Aurora DB cluster.