January 20, 2003

Re-Creating INN Overview Files

I run a linux mail and news server at home, and I use the news server to monitor all of the mailing lists I read - nothing can beat proper threaded news. I discovered the other day that I wasn't receiving messages in a couple of groups, and today discovered why. The error in my news logs contained the phrase "server cant store article : File exists" (their bad grammar).

An improper shutdown a week or so ago had corrupted some of my "overview" and / or history data. I gathered from google groups that I needed to rebuild this, but it took me ages to find the information that told me how to do this. Therefore, in the name of helping some poor soul like me, this is how I did it:

I am using debian linux and my history files are stored at:
/var/lib/news

My news binaries seem to be here:
/usr/lib/news/bin

The commands I typed were:
cd /var/lib/news
rm -f /var/lib/news/history*
rm -rf /var/spool/news/overview/*
/usr/lib/news/bin/makehistory -O -e -f history.n -l 600000
/usr/lib/news/bin/makedbz -s `wc -l <history.n` -f history.n
mv history.n history
mv history.n.dir history.dir
mv history.n.hash history.hash
mv history.n.index history.index

I hope that helps somebody. These commands successfully rebuilt my history and overview files and I'm now receiving all of my news properly again. Now I just need to find some way to avoid losing mail if my server ever dies again.

Posted by Simon at January 20, 2003 08:34 PM
Feedback

Oh, I should really mention that this probably ought to be done when logged in as news - I did, and I didn't experience any problems so I suggest that it's best to do this.

Posted by Simon at Jan 20, 2003 8:40 PM

Oh, and having thought that fixed it, new posts then got rejected again. I repeated the procedure, and included a run of news.daily expireover for good measure. I think the problem is now fixed.

Posted by Simon at Jan 20, 2003 9:19 PM