Search code examples
amazon-dynamodbbackupretentionpitr

What is the difference between continuous backup and PITR for DynamoDB tables?


I have a few DynamoDB tables.

Continuous backup is enabled for all of them while Point In Time Recovery (PITR) is enabled for most.

According to documentation for PITR, we can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.

What will happen if PITR is disabled but continuous backup is enabled? Can I still restore the 'backup'? If so, what is the retention period or number of backups I will have?

Following command is returning true for all tables.

aws dynamodb describe-continuous-backups
      --table-name "$table"
      --query "ContinuousBackupsDescription.ContinuousBackupsStatus" 
      --output text --region "$region"

Following code is returning true for most tables:

aws dynamodb describe-continuous-backups
 --table-name "$table"
 --query "ContinuousBackupsDescription.PointInTimeRecoveryDescription.PointInTimeRecoveryStatus"
   --output text --region "$region"

What is the difference between the two?


Solution

  • Continuous backups are always enabled on new tables and you can't disable that. There's no cost for it. It ensures data resilience.

    You can enable or disable PITR. There's a cost to enabling it. You must have PITR enabled to initiate a point in time recovery or do any exports to S3.

    You must have had PITR enabled at the point in time where you're doing the point in time restore or export (or incremental export too). It goes back 35 days.