Creating a final backup - Amazon ElastiCache for Redis

Creating a final backup

You can create a final backup using the ElastiCache console, the AWS CLI, or the ElastiCache API.

You can create a final backup when you delete a Redis cache using the ElastiCache console.

To create a final backup when deleting a Redis cache, on the delete dialog box choose Yes under Create backup and give the backup a name.

You can create a final backup when deleting a Redis cache using the AWS CLI.

When deleting a Redis serverless cache

To create a final backup, use the delete-serverless-cache AWS CLI operation with the following parameters.

  • --serverless-cache-name – Name of the cache being deleted.

  • --final-snapshot-name – Name of the backup.

The following code creates the final backup bkup-20231127-final when deleting the cache myserverlesscache.

For Linux, macOS, or Unix:

aws elasticache delete-serverless-cache \ --serverless-cache-name myserverlesscache \ --final-snapshot-name bkup-20231127-final

For Windows:

aws elasticache delete-serverless-cache ^ --serverless-cache-name myserverlesscache ^ --final-snapshot-name bkup-20231127-final

For more information, see delete-serverless-cache in the AWS CLI Command Reference.

When deleting a Redis cluster with no read replicas

To create a final backup, use the delete-cache-cluster AWS CLI operation with the following parameters.

  • --cache-cluster-id – Name of the cluster being deleted.

  • --final-snapshot-identifier – Name of the backup.

The following code creates the final backup bkup-20150515-final when deleting the cluster myRedisCluster.

For Linux, macOS, or Unix:

aws elasticache delete-cache-cluster \ --cache-cluster-id myRedisCluster \ --final-snapshot-identifier bkup-20150515-final

For Windows:

aws elasticache delete-cache-cluster ^ --cache-cluster-id myRedisCluster ^ --final-snapshot-identifier bkup-20150515-final

For more information, see delete-cache-cluster in the AWS CLI Command Reference.

When deleting a Redis cluster with read replicas

To create a final backup when deleting a replication group, use the delete-replication-group AWS CLI operation, with the following parameters:

  • --replication-group-id – Name of the replication group being deleted.

  • --final-snapshot-identifier – Name of the final backup.

The following code takes the final backup bkup-20150515-final when deleting the replication group myReplGroup.

For Linux, macOS, or Unix:

aws elasticache delete-replication-group \ --replication-group-id myReplGroup \ --final-snapshot-identifier bkup-20150515-final

For Windows:

aws elasticache delete-replication-group ^ --replication-group-id myReplGroup ^ --final-snapshot-identifier bkup-20150515-final

For more information, see delete-replication-group in the AWS CLI Command Reference.