0
0
DynamoDBquery~5 mins

On-demand backups in DynamoDB

Choose your learning style9 modes available
Introduction

On-demand backups let you save a copy of your database whenever you want. This helps protect your data from loss or mistakes.

Before making big changes to your database, so you can restore if something goes wrong.
To keep a snapshot of your data at a certain time for auditing or compliance.
When you want to move data between environments safely.
To create a backup before deleting or archiving old data.
To protect your data before software updates or migrations.
Syntax
DynamoDB
aws dynamodb create-backup --table-name <TableName> --backup-name <BackupName>
Replace with your DynamoDB table's name.
Replace with a unique name for your backup.
Examples
This command creates a backup of the 'Customers' table named 'CustomersBackup2024'.
DynamoDB
aws dynamodb create-backup --table-name Customers --backup-name CustomersBackup2024
This command creates a backup of the 'Orders' table with the name 'OrdersBackup_March'.
DynamoDB
aws dynamodb create-backup --table-name Orders --backup-name OrdersBackup_March
Sample Program

This command creates an on-demand backup of the 'Employees' table with the name 'EmployeesBackup_202406'.

DynamoDB
aws dynamodb create-backup --table-name Employees --backup-name EmployeesBackup_202406
OutputSuccess
Important Notes

On-demand backups do not affect your table's performance.

Backups are stored securely and can be restored anytime.

Backup creation may take a few moments depending on table size.

Summary

On-demand backups let you save your DynamoDB table data anytime.

Use the AWS CLI command create-backup with your table and backup names.

Backups help protect your data and allow easy recovery.