Amazon Relational Database Service
User Guide (API Version 2012-01-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Backup and Restoration

Amazon RDS provides two different methods for backing up and restoring your Amazon DB Instances: automated backups and DB Snapshots. Automated backups automatically back up your DB Instance during a specific, user-definable backup window, and keeps the backups for a limited, user-specified period of time (called the backup retention period); you can later recover your database to any point in time during that retention period. DB Snapshots are user-created snapshots that enable you to back up your DB Instance to a known state, and restore to that specific state at any time. Amazon RDS keeps all DB Snapshots until you delete them.

[Note]Note

A brief I/O freeze (typically lasting a few minutes) occurs during both automated and user-initiated backup operations on Single-AZ DB Instances. An I/O freeze does not occur for Multi-AZ deployments. For more information on Multi-AZ deployments, see Multi-AZ Deployments

Automated Backup

Automated backup is an Amazon RDS feature that automatically creates a backup of your database. This backup occurs during a daily user-configurable period of time known as the backup window. Backups created during the backup window are retained for a user-configurable number of days (the backup retention period).

When the backup retention changes to a non-zero value, the first backup occurs immediately. Changing the backup retention period to 0 turns off automatic backups for the DB Instance, and deletes all existing automated backups for the instance.

You can specify the daily backup window for the automated backup when you create or modify your DB Instance. If you don't specify a preferred backup window when you create the DB Instance, Amazon RDS assigns a default 30-minute backup window which is selected at random from a 8-hour block of time per region. The following table lists the time blocks for each Region from which the default backups windows are assigned.

RegionTime Block
US East (Northern Virginia) Region03:00-11:00 UTC
US West (Northern California) Region06:00-14:00 UTC
US West (Oregon) Region06:00-14:00 UTC
EU (Ireland) Region22:00-06:00 UTC
Asia Pacific (Singapore) Region14:00-22:00 UTC
Asia Pacific (Tokyo) Region17:00-03:00 UTC

Changes to the backup window take effect immediately. The backup window cannot overlap with the weekly maintenance window for the DB Instance.

[Note]Note

Automated backups are enabled by default for a new DB Instance.

For more information on working with automated backups, go to Working With Automated Backups.

Point-In-Time Recovery

In addition to the daily automated backup, Amazon RDS archives database change logs. This enables you to recover your database to any point in time during the backup retention period, up to the last five minutes of database usage.

Amazon RDS stores multiple copies of your data, but these copies are stored in a single availability zone for Single-AZ DB Instances. If for any reason a Single-AZ DB Instance is not usable, the DB Instance enters the failed state. In the unlikely event this occurs, you can use point-in-time recovery to restore your database instance to the latest restorable time. For more information on working with point-in-time recovery, go to Restoring a DB Instance to a Specified Time.

[Note]Note

Multi-AZ deployments store copies of your data in different Availability Zones for greater levels of data durability. For more information on Multi-AZ deployments, see Multi-AZ Deployments.

DB Snapshots

DB Snapshots are user-initiated backups of a DB Instance. DB Snapshots are retained until they are deleted by the user. For more information on working with DB Snapshots, see Creating a DB Snapshot and Restoring From a DB Snapshot.

Automated Backups with Unsupported Engines

Amazon RDS automated backups and DB Snapshots are currently supported for the InnoDB engine only. Use of these features with other MySQL engines, including MyISAM, may lead to unreliable behavior while restoring from backups. Specifically, since storage engines like MyISAM do not support reliable crash recovery, your tables can be corrupted in the event of a crash. For this reason, we encourage you to use the InnoDB storage engine.

If you choose to use MyISAM, you can attempt to manually repair tables that become damaged after a crash using the REPAIR command ((see: http://dev.mysql.com/doc/refman/5.5/en/repair-table.html). However, as noted in the MySQL documentation, there is a good chance that you will not be able to recover all your data.

If you wish to take DB snapshots with MyISAM tables, follow these steps:

Launch Process

1

Stop all activity to your MyISAM tables (that is, close all sessions)

2

Lock and flush each of your MyISAM tables

3

Issue a CreateDBSnapshot API call, or use the RDSCLI rds-create-db-snapshot command. When the snapshot has completed, release the locks and resume activity on the MyISAM tables. These steps force MyISAM to flush data stored in memory to disk thereby ensuring a clean start when you restore from a DB snapshot.


Finally, if you would like to convert existing MyISAM tables to InnoDB tables, you can use alter table command (for example, alter table TABLE_NAME engine=innodb;).