Introducing Dragonfly Cloud! Learn More

Question: How do you backup data in AWS ElastiCache Redis?


Creating a backup of your Redis cluster in AWS ElastiCache involves creating a snapshot of the data at a specific point in time. This snapshot can then be used to restore the data if required.

Steps to Create a Backup

  1. Open the ElastiCache Dashboard in the AWS console.
  2. In the navigation pane, choose Redis.
  3. Choose the Redis replication group that you want to back up.
  4. Choose Actions, Create Snapshot.
  5. For Snapshot Name, enter a name for your snapshot.
  6. Choose Create.

AWS starts creating the snapshot, which might take a while depending on the size of the data.

If you prefer using AWS CLI, use the following command:

aws elasticache create-snapshot \ --snapshot-name my-snapshot \ --replication-group-id my-replication-group \ --cache-cluster-id my-cache-cluster

Remember to replace my-snapshot, my-replication-group, and my-cache-cluster with appropriate values.

Automatic Backups

You can also configure automatic backups by setting a backup window during which snapshots are automatically taken. This is configured when creating or modifying an ElastiCache Redis cluster.

Note: Snapshots are stored until you manually delete them, and they incur storage costs.

Restoring data from a snapshot involves creating a new cluster from the snapshot. And remember, data restoration will override existing data in the target cluster.

It is recommended to regularly backup your data and validate your backup strategy to safeguard against data loss or corruption.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.