Current time: 08-19-2019, 10:50 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clearing out old data
01-25-2015, 10:29 AM (This post was last modified: 01-25-2015 10:32 AM by ovesh.)
Post: #1
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?

I think this post may be helpful: http://www.webpagetest.org/forums/showth...85#pid8285
Find all posts by this user
Quote this message in a reply
01-29-2015, 01:08 AM
Post: #2
RE: Clearing out old data
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-29-2015, 03:47 AM
Post: #3
RE: Clearing out old data
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...st-server/
Find all posts by this user
Quote this message in a reply
01-29-2015, 03:55 AM
Post: #4
RE: Clearing out old data
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).
Visit this user's website Find all posts by this user
Quote this message in a reply
01-29-2015, 12:11 PM
Post: #5
RE: Clearing out old data
Thanks @pmeenan, @ShaneLabs, very helpful!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)