Clearing out old data

What is the recommended way to clear out old test data from a private instance?

I can set up a cron job. Where are the files that should be pruned?
[hr]
I think this post may be helpful: http://www.webpagetest.org/forums/showthread.php?tid=3547&pid=8285#pid8285

The tests are stored in results/YY/MM/DD so you can nuke directories as needed. You can also set up archiving rules in settings.ini and set up cron to run cli/archive.php

At some point I need to add code to prune tests automatically based on available disk spaceas an option.

Hey ovesh - I had a similar requirement and I leveraged the archiving capability + a hack to automatically delete tests older than X days, every day.

Details for this hack are here: http://hostbenchmarker.com/blog/deleting-old-tests-private-webpagetest-server/

I think with a tiny change to allow for “none” or “/dev/null” as the archive location we could make it work out of the box as well without having to hack the script. Only reason it won’t work right now is that it verifies that the archive worked before deleting but we could special-case /dev/null and skip the archiving (probably best to have that logic inside archive.inc proper so it also doesn’t try to restore).

Thanks @pmeenan, @ShaneLabs, very helpful!