BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Amazon Aurora Adds "Backtrack" Feature to Enable Rewinding a DB Cluster to a Specific Point in Time

Amazon Aurora Adds "Backtrack" Feature to Enable Rewinding a DB Cluster to a Specific Point in Time

This item in japanese

Bookmarks

Amazon Aurora, a fully-managed relational database service in AWS, is now offering a backtrack feature. With Amazon Aurora with MySQL compatibility, users can backtrack, or "rewind", a database cluster to a specific point in time, without restoring data from a backup. The backtrack process allows a point in time to be specified with one second resolution, and the rewind process typically takes minutes. This new feature facilitates developers in undoing mistakes like deleting data inappropriately or dropping the wrong table.

The new backtracking feature within Amazon Aurora allows a user to "rewind" a database (DB) cluster to within one second of a specified point in time. The backtracking documentation states that this feature is not a replacement for running and maintaining regular backups of DB clusters. However, backtracking provides the following advantages over traditional backup and restore: the DB cluster can be backtracked to a time before a destructive action with minimal interruption of service; backtracking a DB cluster doesn't require a new DB cluster, and instead "rewinds" the DB cluster in minutes; earlier data changes can easily be explored -- users can repeatedly backtrack a DB cluster back and forth in time to help determine when a particular data change occurred.

Amazon announced the backtrack feature for Aurora two weeks ago, which currently only works for MySQL databases. Furthermore, developers have to opt-in for the backtrack feature for all newly-launched Aurora database clusters or clusters that they restore from a backup. After enabling the backtrack feature, AWS provisions a First in First Out (FIFO) buffer in the Aurora database cluster. During the use of the database cluster, Aurora will leverage a distributed, log-structured storage system; each change to any of the databases will generate new log records, which are identifiable by a so-called Log Sequence Number (LSN). Moreover, these LSNs are stored in the buffer, allowing quick access and recovery.

When a developer wants to initiate a backtrack, they can pause their application, open up the Aurora console in a browser, select the cluster the application uses, and click Backtrack DB cluster.


Source: https://aws.amazon.com/blogs/aws/amazon-aurora-backtrack-turn-back-time/

The next step for the developer is to choose the desired point back in time and execute the backtrack by selecting the "Backtrack DB cluster" option. Subsequently, the developer can monitor the execution of backtrack in the console -  a process which consists of the Aurora database service pausing the database, closing all open connections, dropping uncommitted writes, and waiting for the backtrack to finish to resume normal operations. The console will notify the developer when the backtrack is complete. 


Source: https://aws.amazon.com/blogs/aws/amazon-aurora-backtrack-turn-back-time/

Arjen Schwarz, a Lead DevOps engineer/AWS delivery lead at Bulletproof, wrote in his weekly notes blog post about the backtrack feature:

If you have experience with restoring an Aurora database, you’ll likely be aware that restoring a snapshot onto a new cluster can take almost an hour. Rolling back with Backtrack instead is a matter of seconds, and you can roll back to the exact second you wish as well. This means that if you need to roll back because someone ran the wrong query, or because of a failed rollout of a new version of your app, you can do so without losing any data or time.

Note that when a developer backtracks too far, they will be able to backtrack to another point in time -- this feature effectively allows a developer to "scrub", or search, across the timeline repeatedly. Moreover, the Aurora service has cloning, backups, and restore capabilities designed to work with the new backtrack feature. 

Aurora backtrack feature is available in all AWS regions where Amazon Aurora runs. The cost of this new feature is about $0.012 per one million change records for databases hosted in the company’s U.S. regions, with slightly higher prices in Europe and Asia. For details, see the Aurora pricing page.

Rate this Article

Adoption
Style

BT