[news.admin] Help with expire

tombre@crin.UUCP (05/18/87)

Many thanks to all those who responded to my request for help with expire.
As several people wanted to see the answers, I give here a summary of what
needs to be done :

1) Get an up to date version of expire.c. Thanks to rick@seismo for this.
Applying his patches should lead to the right version, but
our problem was that the patches could not be applied (bad patch version,
beta version of news 2.11, ...) The latest version number for expire.c is
2.53.

2) Be careful not to run 2 expires simultaneously ; this leads to great
trouble. Best way to avoid it : put all expires in a shell script which is
executed by the crontab. Here is my solution to this (thanks to Len Tower
for the advise of doing it this way) :

0 2 * * 1-6 sh /usr/lib/news/expire.sh > /usr/lib/news/expire.log 2>&1

and here is expire.sh :

#! /bin/sh
# Lancements nocturnes de expire pour nettoyer les news
# Karl Tombre - 18/05/87
# comp.sys apres 1 semaine
# rec et soc apres 3 jours
# le reste apres 2 semaines
/usr/lib/news/expire -n comp.sys -e 7 -I 
/usr/lib/news/expire -n rec,soc -e 3 -I 
/usr/lib/news/expire -e 14 

3) Be careful not to run expire close to a daily shutdown for maintenance.
This was not our problem, the VAX on which we get news runs non-stop.

4) There may still be trouble, as some articles may be in the spool
directories but not in the history file. Some people proposed to run a find
with exec rm for old files in the spool area. But I found the other solution
"cleaner" : rebuild the history file regularly to keep things consistent.
Our man for expire didn't tell me anything about this feature : expire -r
rebuilds the history file (thanks to pep@princeton and aburt@isis for
pointing this out). WARNING : expire -r needs lots of time to run!!!
I chose to run it once in the week, on sundays :

0 2 * * 7 sh /usr/lib/news/expire-weekly.sh > /usr/lib/news/expire.log 2>&1

where expire-weekly.sh is the same as expire.sh, but contains one extra line
as first instruction (expire -r).

-- 
--- Karl Tombre @ CRIN (Centre de Recherche en Informatique de Nancy)
EMAIL : tombre@crin.UUCP
POST  : Karl Tombre, CRIN, B.P. 239, 54506 VANDOEUVRE CEDEX, France
PHONE : +33  83.91.21.25