Setting the backtrack window for Aurora clusters allows you to "rewind" the database cluster to the time you specify much more easily than manually restoring from a snapshot. Learn more about the benefits of backtracking in this article from AWS.
Backtracking is not available for AWS GovCloud.
The default value for the BacktrackWindowParameter is 0, which means backtracking is disabled. Since the backtrack value must be set during the initial deployment of the database, existing users must redeploy their database to enable it. If you choose to redeploy your database, you won't lose any of your data.
To add backtracking, create a new database with the setting enabled, switch over the Kion application to the new database, and delete the old database. This process will result in some application downtime.
To create a new database, you will need a CloudFormation template. Before beginning this process, download the cloudtamer-aurora.json file at the end of the AWS Deployment Guide.
To Create a New Database and Move the Kion Application:
Start by taking a manual backup. For guidance on taking manual backups, see our AWS RDS Backup Guide.
- Let users know that the application is going down for maintenance.
- Create a new database using the cloudtamer-aurora.json file.
- Change the Namespace field in the CloudFormation template, ensuring it is different from the namespace field in the current database.
- Paste your latest snapshot ARN into the DBSnapshotID field.
- The snapshot ARN can be found by accessing the AWS Console, navigating to Services > RDS > Snapshots . Click the name of the snapshot you want to restore from. The ARN is at the top of the details listed.
- Change the BacktrackWindowParameter field to a number greater than 0 to enable it. The parameter value is in seconds, so entering 3,600 would be 3,600 seconds or 1 hour. The maximum value is 259,200 (72 hours).
- Launch the creation of the stack.
- Once the database is available, update the cloudtamer-app CloudFormation stack with the new database URL. Ensure you use the cluster writer endpoint, not the reader endpoint.
- Once the app CloudFormation stack finishes, check that you can access the application from your web browser.
- Once you have verified the application is working, you can delete the old DB CloudFormation stack.
The backtrack feature does have some limitations, which are detailed in this article from AWS.