End of year tasks

From Aber
Jump to: navigation, search

This should be done as soon after midnight on New Year's Day as possible. Typically in the past we've got away with 2 or 3 days. As long as it's done before the general start to the working year then it's acceptable.

The procedure's pretty simple these days and shouldn't take too long (it used to take ages and be incredibly tedious). Steps 1-9 consign last year's log to the archive table. Steps 10 to 13 create a new page for last year's topics in the wiki, resets the pages for this year's topics and URLs (they will most likely be blank for a few hours) and wipes the "log_current" database table ready for fresh log data.

All the following commands must be run as user "aber".

  1. cd /home/aber/bots/saarlax/logs/content
  2. mv \#aber.log /home/aber/bots/scripts/occasional/<year>.log (where <year> is the year just ended, not the year that's just started).
  3. touch \#aber.log; chown aber:aber \#aber.log
  4. Say something on channel and make sure it appears in the new file.
  5. cd /home/aber/bots/scripts/occasional
  6. Edit logupload.pl, incrementing the year variable (remember it should be LAST year, not the year that just started).
  7. ./logupload.pl
  8. rm <year>.log (if you want)
  9. Edit historic-topics.php, incrementing the year variable in the same way.
  10. ./historic-topics.php
  11. cd ..
  12. ./website-update.php

See, simple. Should take no more than 5-10 minutes.

The remaining script in this directory is for removing lines from a given nick from the log, as per the pledge in the terms and conditions in the log search. However, nobody ever asks and so it probably doesn't work any more. If you have cause to use it please update it accordingly, it will probably require a re-write in PHP. I'd move it to ../old if I could guarantee that it would never be required again, but I can't, so I won't.