daveb@llama.rtech.UUCP (Dave Brower) (07/07/88)
There's a bunch of stuff in junk that I would like to refeed into rnews now that I've fixed the problem that caused the junking. Unfortunately, the history file says the articles have already been seen, so [ir]news ignores them. Is there any easy way of handling this problem? The worst case would be to rebuild the history file (which would take forever), and I'm not even really sure how I'd do that. Tips appreciated, -dB --- "Ready when you are Raoul!" {amdahl, cpsc6a, mtxinu, sun, hoptoad}!rtech!daveb daveb@rtech.com <- FINALLY!
jfh@rpp386.UUCP (John F. Haugh II) (07/08/88)
In article <2293@rtech.rtech.com> daveb@llama.rtech.UUCP (Dave Brower) writes: >There's a bunch of stuff in junk that I would like to refeed into rnews >now that I've fixed the problem that caused the junking. Unfortunately, >the history file says the articles have already been seen, so [ir]news >ignores them. > >Is there any easy way of handling this problem? The worst case would be >to rebuild the history file (which would take forever), and I'm not even >really sure how I'd do that. the technique which i use is to grep out all of the lines containing `junk' in the history files and resubmit all of the articles in junk. this assumes you aren't running DBM. if you are, you can just remove the history files, resubmit the articles and then rebuild the history files. i suspect the speed of DBM versus not makes this a fast alternative. in the former case, no DBM, you can select only the articles in junk, which are, in this case, the only articles you are going to resubmit. you do need to be careful in any event because you could wind up sending all of these articles to your downstream feeds all over again if you aren't. this seems about right, your milage may vary. - john. -- John F. Haugh II +--------- Cute Chocolate Quote --------- HASA, "S" Division | "USENET should not be confused with UUCP: killer!rpp386!jfh | something that matters, like CHOCOLATE" DOMAIN: jfh@rpp386.uucp | -- with my apologizes
greg@vertical.oz (Greg Bond) (07/11/88)
This is what I do if I have problems (like full spool disks) and need to resubmit stuff to inews. First, my feed gets a file of article ID's (from my errlog file usually) and runs this script: #! /bin/sh # "dropped" contains the list of article IDs. fgrep -f dropped /usr/lib/news/history | awk '{printf("/usr/spool/news/%s\n", $4);}' | tr . / > files # "files" now contains the list of article filenames. (echo "#! cunbatch" ; /usr/lib/news/batch files 10000000 | \ /usr/lib/news/compress) > urk # "urk" now contains the batched, compressed news. which creates a file of re-sent compressed batched news. This is sendfile'd (or uucp'd for those on primitive nets :-) direct to me. Then I run this script: #! /bin/sh # # Given a compressed batch file batch that consists of articles # that have been dropped and resent, post them. We need to do 3 things: # # 1) strip the #! cunbatch header and uncompress # 2) Change the Message-ID so that the news history mechanism # will not reject it as duplicate (prepend a v.) # 3) Alter the #! rnews length fields to account for 2) # # Assume the input file is stdin # # This is NOT fast! # # Greg@vertical.oz 3May88 # dd ibs=12 obs=8k skip=1 | uncompress | \ sed -e '/^Message-ID:/s/</<v./' | \ awk ' /^#! rnews/ { print $1, $2, $3 + 2 } !/^#! rnews/ {print $0}' | \ rnews This is not a problem as the news topology here is that there are no cross- links downstream from me, and no-one sees articles twice. I wouldn't recommend this method if you have multiple feeds. But if you did' you probably wouldn't need this sort of fix anyway..... (My thanks to john@latcs1 (my feed until this week) who wrote the first script and was always kind enough to resend stuff when my stupid disk filled up). Greg. -- Gregory Bond, Vertical Software, Melbourne, Australia Internet: greg@vertical.oz.au (or greg%vertical.oz.au@uunet.uu.net) Bang: {uunet,mcvax,pyramid,mnetor,ukc,ucb-vision,...}!munnari!vertical.oz!greg I used to be a pessimist. Now I'm a realist.
aad@stpstn.UUCP (Anthony A. Datri) (07/12/88)
Okay, but how do I resubmit junk articles? -- @disclaimer(Any concepts or opinions above are entirely mine, not those of my employer, my GIGI, or my 11/34) beak is beak is not Anthony A. Datri,SysAdmin,StepstoneCorporation,stpstn!aad
jfh@rpp386.UUCP (John F. Haugh II) (07/13/88)
In article <1861@stpstn.UUCP> aad@stpstn.UUCP (Anthony A. Datri) writes: > >Okay, but how do I resubmit junk articles? you remove them from the history file either by removing the complete history file and rebuilding it later, or for non-DBM sites by editing the individual history files. then pipe each article into rnews. works great. - john. -- John F. Haugh II +--------- Cute Chocolate Quote --------- HASA, "S" Division | "USENET should not be confused with UUCP: killer!rpp386!jfh | something that matters, like CHOCOLATE" DOMAIN: jfh@rpp386.uucp | -- with my apologizes
jdiaz@hqsun1.oracle.UUCP (Jean Diaz) (07/13/88)
In article <1861@stpstn.UUCP> aad@stpstn.UUCP (Anthony A. Datri) writes: > >Okay, but how do I resubmit junk articles? Here it is, courtesy of the only person who answered this question when I had it six months ago.... (edited somewhat to reflect what I've learned since then ). AMBAR >I have had to "rescue" articles from junk occasionally... here is what I >do. > >1) Copy contents of junk directory to (say) /usr/spool/news/repost > >2) Run /usr/lib/news/expire -n junk -I -e 0 -E 0 [-v if you want to see > what is going on...] > > This removes all trace of the articles from the news history and allows > you to repost them (otherwise you get "duplicate article errors). Make > sure you get the "-n junk" right or you will expire all the news on your > machine. > >3) Now, remove your site name from the Path: line of each article. > I do this on our bsd system with > > apply "sed -f script < %1 | rnews" [0-9]* > > where "script" contains the line "/^Path:/s/myhost!//" > > [I tried passing the sed command as a command line arg to sed but > couldn't get the quoting (particularly of the !) right] > >Duncan > >UUCP : "...seismo!mnetor!utcs!utai!calgary!vuwcomp!duncan" >"You can always tell when politicians lie... their lips move!" - Max Headroom AMBAR
per@erix.UUCP (Per Hedeland) (07/15/88)
The "easy" way to unjunk stuff is to a) cp /usr/spool/news/junk/* safeplace b) expire -e 0 -E 0 -I -n junk c) for f in safeplace/*; do rnews < $f; done ...more or less ("it worked for me"...).