- Hey, this is Kirk from the DynamoDB team.
And today we are talking about backup and restore
with DynamoDB tables.
There are two types of backups offered with DynamoDB,
on-demand backups and continuous backups
with point-in-time recovery.
Both types of backups have three things in common,
all data is encrypted at rest,
the ability to restore to another AWS Region,
and being able to back up petabytes worth of data
with no performance impacts on your base table.
First up is continuous backups with point-in-time recovery.
These are continuous incremental backups
that allow you to restore to any one second
in the last 35 days.
There is nothing to maintain and no scheduling required.
More than likely, you should have a good reason
to not have continuous backups enabled
on your production tables.
My favorite feature of continuous backups
is that, beyond simple restores,
is it enables exporting of your table's data to S3
and other services without affecting the performance
of your base table in DynamoDB.
This enables you to run services like Athena
and Machine Learning over that same data
to make the data even more useful to you.
On-demand backups are used
to create a full backup of your table,
a snapshot, if you will.
It provides long-term retention
and meets regulatory compliance needs.
On-demand backups can be cataloged, discoverable,
and retained until explicitly deleted.
You can create on-demand backups via the AWS console,
API, CLI, or the AWS Backup service.
For on-demand backups of your DynamoDB table,
the AWS Backup service should be your go-to mechanism.
AWS Backup service offers end-to-end management
of on-demand backups for DynamoDB.
It automates scheduled backups and retention enforcement.
You can copy backups between AWS Regions and accounts
as well as restore backups between AWS Regions.
You can store backups in encrypted AWS Vaults,
which you can secure multiple different ways,
including an encryption key that's different
from the DynamoDB base table encryption key.
My second favorite feature of AWS Backups
is being able to automatically move older backups
to a cold storage tier
and thus save on storage costs.
And finally, your backups inherit tags
from your source DynamoDB tables,
allowing you to use those tags to set permissions
and service control policies on your backups.
All right, let's look at a demo real quick.
Here, we have a table called ParcelTracker
in the DynamoDB console.
We're on the Backups tab,
and I'm gonna turn on continuous backups
with point-in-time recovery.
I click Edit. I click Enable.
I hit Save Changes, and I'm done.
It is now backing up every single item that is written
or updated in this table.
Now, let's set up an on-demand backup.
I'm gonna hit Create backup, Create on-demand backup.
Now, I have some options here if I want to.
If I do the default, it'll use the AWS Backup service.
It'll start in the next one hour.
It won't use cold storage,
and it won't have a retention period on it.
It'll just always be there until I delete it.
I do this, and then I hit Create backup,
and the AWS Backup service will go ahead
and start creating the backup for me.
You can see that I already have two backups
that I created just a little bit ago.
In summary, on-demand backups
are usually for regulated industries
where you have longer retention times
or when you need the features of the AWS Backup service.
Remember, it's best practice to enable continuous backups
with point-in-time recovery.
You should have a really good reason
not to have continuous backups enabled on your tables.
Also, this is not an either/or scenario.
You can use both backup methods to your advantage.
One final thing, it's considered best practice
to regularly test your backups.
Make sure you can restore those tables.
Make sure all the data
that you think should be there is there.
Just remember there's a cost component to doing restores.
So, make sure you check the link
for the documentation in the description for this video.
Thanks, and be on the lookout
for more core concept videos here and on our Twitter handle
@DynamoDB.