I'm looking for a tool (for Linux) that will prune my backup files, not like the standard
logrotate that completely deletes them after defined number of rotations, but where the files are basically kept permanently, except they are pruned as they get older and older. For example:
- for the first month I want to keep every single daily backup file
- after that I only want to keep a weekly backup for the next 6 months
- after that I only want to keep a monthly backup for another 6 months
- after that I only want to keep a quarterly backup
Does a tool to do such a time-based cleanup of files exist?
It could either be looking at a date in the file name, or the timestamp of the file (not ideal though).