We run a number of Ubuntu servers (standard image)
Currently we have a number of EC2 volume snapshots being created each day for server backups, as well as daily RDS snapshots being created.
Whilst this is good for temporary requirements, these backups need to be removed after some time to reduce the space used.
As a minimum, two shell scripts are required;
1a) list & remove EC2 volume snapshots which are more than a week old. This should take a similar approach to capistrano's release 'cleanup' task, where the most recent 7 backups should be kept, with the remaining being removed.
1b) Of the snapshots older than 7 days, two snapshots per month should be kept (based on the day of the month (eg. 1st and 15th).
1c) The names of snapshots & their creation dates of those found for deletion should be output when the command is run.
1d) When a '--dry-run' parameter in the command line is specified, no snapshots should be removed (output names & dates only)