Backtracking an Aurora DB cluster (original) (raw)

With Amazon Aurora MySQL-Compatible Edition, you can backtrack a DB cluster to a specific time, without restoring data from a backup.

Contents

Overview of backtracking

Backtracking "rewinds" the DB cluster to the time you specify. Backtracking is not a replacement for backing up your DB cluster so that you can restore it to a point in time. However, backtracking provides the following advantages over traditional backup and restore:

Backtrack window

With backtracking, there is a target backtrack window and an actual backtrack window:

As you make updates to your Aurora DB cluster with backtracking enabled, you generate change records. Aurora retains change records for the target backtrack window, and you pay an hourly rate for storing them. Both the target backtrack window and the workload on your DB cluster determine the number of change records you store. The workload is the number of changes you make to your DB cluster in a given amount of time. If your workload is heavy, you store more change records in your backtrack window than you do if your workload is light.

You can think of your target backtrack window as the goal for the maximum amount of time you want to be able to backtrack your DB cluster. In most cases, you can backtrack the maximum amount of time that you specified. However, in some cases, the DB cluster can't store enough change records to backtrack the maximum amount of time, and your actual backtrack window is smaller than your target. Typically, the actual backtrack window is smaller than the target when you have extremely heavy workload on your DB cluster. When your actual backtrack window is smaller than your target, we send you a notification.

When backtracking is enabled for a DB cluster, and you delete a table stored in the DB cluster, Aurora keeps that table in the backtrack change records. It does this so that you can revert back to a time before you deleted the table. If you don't have enough space in your backtrack window to store the table, the table might be removed from the backtrack change records eventually.

Backtracking time

Aurora always backtracks to a time that is consistent for the DB cluster. Doing so eliminates the possibility of uncommitted transactions when the backtrack is complete. When you specify a time for a backtrack, Aurora automatically chooses the nearest possible consistent time. This approach means that the completed backtrack might not exactly match the time you specify, but you can determine the exact time for a backtrack by using thedescribe-db-cluster-backtracks AWS CLI command. For more information, seeRetrieving existing backtracks.

Backtracking limitations

The following limitations apply to backtracking:

Region and version availability

Backtrack is not available for Aurora PostgreSQL.

Following are the supported engines and Region availability for Backtrack with Aurora MySQL.

Region Aurora MySQL version 3 Aurora MySQL version 2
US East (N. Virginia) All versions All versions
US East (Ohio) All versions All versions
US West (N. California) All versions All versions
US West (Oregon) All versions All versions
Africa (Cape Town)
Asia Pacific (Hong Kong)
Asia Pacific (Jakarta)
Asia Pacific (Malaysia)
Asia Pacific (Melbourne)
Asia Pacific (Mumbai) All versions All versions
Asia Pacific (Osaka) All versions Version 2.07.3 and higher
Asia Pacific (Seoul) All versions All versions
Asia Pacific (Singapore) All versions All versions
Asia Pacific (Sydney) All versions All versions
Asia Pacific (Tokyo) All versions All versions
Canada (Central) All versions All versions
Canada West (Calgary)
China (Beijing)
China (Ningxia)
Europe (Frankfurt) All versions All versions
Europe (Ireland) All versions All versions
Europe (London) All versions All versions
Europe (Milan)
Europe (Paris) All versions All versions
Europe (Spain)
Europe (Stockholm)
Europe (Zurich)
Israel (Tel Aviv)
Middle East (Bahrain)
Middle East (UAE)
South America (São Paulo)
AWS GovCloud (US-East)
AWS GovCloud (US-West)

Upgrade considerations for backtrack-enabled clusters

You can upgrade a backtrack-enabled DB cluster from Aurora MySQL version 2 to version 3, because all minor versions of Aurora MySQL version 3 are supported for Backtrack.

Subscribing to a backtrack event with the console

The following procedure describes how to subscribe to a backtrack event using the console. The event sends you an email or text notification when your actual backtrack window is smaller than your target backtrack window.

To view backtrack information using the console
  1. Sign in to the AWS Management Console and open the Amazon RDS console athttps://console.aws.amazon.com/rds/.
  2. Choose Event subscriptions.
  3. Choose Create event subscription.
  4. In the Name box, type a name for the event subscription, and ensure that Yes is selected for Enabled.
  5. In the Target section, choose New email topic.
  6. For Topic name, type a name for the topic, and forWith these recipients, enter the email addresses or phone numbers to receive the notifications.
  7. In the Source section, choose Instances for Source type.
  8. For Instances to include, choose Select specific instances, and choose your DB instance.
  9. For Event categories to include, choose Select specific event categories, and choose backtrack.
    Your page should look similar to the following page.
    Backtrack event subscription
  10. Choose Create.

Retrieving existing backtracks

You can retrieve information about existing backtracks for a DB cluster. This information includes the unique identifier of the backtrack, the date and time backtracked to and from, the date and time the backtrack was requested, and the current status of the backtrack.

Note

Currently, you can't retrieve existing backtracks using the console.

The following procedure describes how to retrieve existing backtracks for a DB cluster using the AWS CLI.

To retrieve existing backtracks using the AWS CLI
aws rds describe-db-cluster-backtracks \  
    --db-cluster-identifier sample-cluster  

For Windows:

aws rds describe-db-cluster-backtracks ^  
    --db-cluster-identifier sample-cluster  

To retrieve information about the backtracks for a DB cluster using the Amazon RDS API, use theDescribeDBClusterBacktracks operation. This operation returns information about backtracks for the DB cluster specified in the DBClusterIdentifier value.