Enabling point-in-time recovery - Amazon DynamoDB
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Enabling point-in-time recovery

Amazon DynamoDB point-in-time recovery (PITR) provides automatic backups of your DynamoDB table data. This section provides an overview of how the process works in DynamoDB.

Enabling point-in-time recovery

You can enable point-in-time recovery using the Amazon Web Services Management Console, Amazon Command Line Interface (Amazon CLI), or the DynamoDB API. When enabled, point-in-time recovery provides continuous backups until you explicitly turn it off.

After you enable point-in-time recovery, you can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. LatestRestorableDateTime is typically five minutes before the current time. For more information, see Restoring a DynamoDB table to a point in time.

Note

The point-in-time recovery process always restores to a new table.

Enable PITR (console)

To enable PITR using the DynamoDB console
  1. Navigate to the DynamoDB console.

  2. Choose Tables from the left navigation and select your DynamoDB table.

  3. From the Backups tab, choose Turn on for Point in Time Recovery.

Enable PITR (Amazon CLI)

aws dynamodb update-continuous-backups \ --region us-east-1 \ --table-name <ddb-table-name> \ --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true

Enable PITR (API)

Python

import boto3 dynamodb = boto3.client('dynamodb') response = dynamodb.update_continuous_backups( TableName=<table_name>, PointInTimeRecoverySpecification={ 'PointInTimeRecoveryEnabled': True } )

Delete a table with PITR enabled

When you delete a table that has point-in-time recovery enabled, DynamoDB automatically creates a backup snapshot called a system backup and retains it for 35 days (at no additional cost). You can use the system backup to restore the deleted table to the state it was in before deletion. All system backups follow a standard naming convention of table-name$DeletedTableBackup.

Note

Once a table with point-in-time recovery enabled is deleted, you can use system restore to restore that table to a single point in time: the moment just before deletion. You do not have the capability to restore a deleted table to any other point in time in the past 35 days.