You want to regularly backup your EBS volumes, but only keep the last N snapshots so that you can retain an isolated use case oriented set of snapshots in an orderly fashion.
Step-by-step guide
This can be achieved by using the EBS Volume task's Grow & Prune Snapshot Backup Set action as follows:
- Specify the Volume ID (or a Filters JSON) to select the volume(s) you want to retain backups for.
- Choose an applicable Backup Set name for your use case so that you can retain different sets and identify the snapshots in the AWS Management Console (they will be automatically tagged with that name).
- Specify the Backup Retention number N (the number of snapshots that should be retained in this backup set).
- Arrange for the Bamboo build to trigger at an interval applicable for your use case, for example via cron-based scheduling to retain daily backups of your volumes, or after you have pushed changes to your repository to backup your volumes before deploying new code.
What is a Backup Set for EBS Volumes? A Backup Set allows to retain an isolated use case oriented set of the last at most N snapshots of one or more EBS volumes. When the EBS Volume task's Grow & Prune Snapshot Backup Set action executes, it will: While there are also separate Grow Volume Backup Set and Prune Volume Backup Set actions to separate the two activities (for example, to only grow the backup set on each work day, but prune it to the last work day's image at the end of the week), the Grow & Prune Volume Backup Set action covers most rotating backup use cases in a single operation.Backup Policy
and a value based on the Backup Set name (thus "grow the snapshot backup set")Backup Policy
whose value matches matches the Backup Set name
Related articles