Rotate backup files based on certain criteria.