Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we restore to same dynamodb table from backup

I have enabled the Point-in-time-recovery on my dynamodb table. So it will handle the creation of incremental backups. when i tried to restore from backup it is creating a new dynamodb table. Can't we restore to same dynamodb table? If not, what is the best way to do, without impacting the performance of dynamodb table?

like image 528
Balusani Bhaskar Avatar asked Apr 26 '19 10:04

Balusani Bhaskar


People also ask

Can I restore DynamoDB table?

You can restore a table to a point in time using the DynamoDB console or the AWS Command Line Interface (AWS CLI). The point-in-time recovery process restores to a new table.

Where can a backup from a DynamoDB table be restored?

You can restore your DynamoDB table data across AWS Regions with a single click in the AWS Management Console or a simple API call, or in the AWS Command Line Interface. You pay only for the data you transfer out of the source Region and for restoring backups as new tables in destination Regions.

How far back can you restore a DynamoDB table using point-in-time recovery?

Restoring a table using point-in-time recovery. For EarliestRestorableDateTime , you can restore your table to any point in time during the last 35 days. The retention period is a fixed 35 days (5 calendar weeks) and can't be modified.

How long does it take to restore a DynamoDB table?

It can take up to 20 minutes (even if the table is empty) to perform all the actions to create the new table and initiate the restore process. For tables with even data distribution across your primary keys, the restore time is proportional to the largest single partition by item count and not the overall table size.

How do I use DynamoDB on-demand backup?

You can use the DynamoDB on-demand backup capability to create full backups of your tables for long-term retention and archival for regulatory compliance needs. You can back up and restore your table data anytime with a single click on the AWS Management Console or with a single API call.

How do I back up and restore my Table data?

You can back up and restore your table data anytime with a single click on the AWS Management Console or with a single API call. Backup and restore actions run with zero impact on table performance or availability. You can create table backups using the console, the AWS Command Line Interface (AWS CLI), or the DynamoDB API.

What is on-demand backup and restore and how does it work?

As mentioned previously, On-Demand Backup and Restore is an option that allows you to take a snapshot of your DynamoDB table data and restore it at a later time.

How can I restore a table in a different AWS region?

You can restore the table to a different AWS Region from where the backup resides. The sse-specification-override parameter is mandatory for cross-Region restores but optional for restores in the same Region as the source table.


Video Answer


2 Answers

At this time, you can only restore with PITR to another table. I know this sounds terrible, but it is done so the original table cannot be blown away and you are protected and you have options on how you want to restore.

Your best bet is to just repoint your application at the new table. Failing that, you will need to create a process that will update the original table from the newly restored table, if that is your intent.

like image 95
Kirk Avatar answered Oct 17 '22 21:10

Kirk


Not ideal, but you could try this. Make a backup of Table_A, restore to Table_B. Take a backup of Table_B. Drop Table_A. Restore Table_B as Table_A. And drop Table_B.

like image 27
matt_linker Avatar answered Oct 17 '22 19:10

matt_linker