Thinning
Thinning helps you clean up backups when you want to keep e.g. hourly backups for a day, daily backups for amonth, etc…
Installation
$ gem install thinning
Usage
Thinning lists files which should be deleted according to a provided pattern.
The command
thinning --hourly=24 --daily=14
will give you a list with all files which do not match the proivided pattern.
In real world thinning could be used inside a cronjob like this:
find /path/to/backups/mysql/ -size +1G -name "*.sql.gz" | thinning --hourly=24 --daily=14 | xargs rm
License
Thinning is released under the MIT License.