http://www.perlmonks.org?node_id=1063755

mhearse has asked for the wisdom of the Perl Monks concerning the following question:

I use rsync snapshots for backups on my workstation. Every 15 minutes during the workday. Eventually the partition where I'm keeping my snapshots will fill up. Rather than just blindly deleting the oldest snapshots... I thought a better solution might be to following:

1. Convert the snapshot dir's datetime name to epoch
2. In the trip script apply the epochs to a parabolic function: y = x^2
3. Delete snapshot dirs which don't conform to the parabolic function... until the partition is ~70%

The majority of this script is simple enough... but I'm struggling with the parabolic function part. Can someone offer help or advise?