🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
22 messages
22 total messages Started by John F. Morse Sun, 10 Sep 2006 12:12
Renaming a newsgroup
#74216
Author: John F. Morse
Date: Sun, 10 Sep 2006 12:12
100 lines
4696 bytes
Looking at Russ's "INN 2.x FAQ" Section 6.5 "Rename a newsgroup"

Jeff has contributed the following Perl:

#!/usr/bin/perl -wi
my ($src, $dst) = (shift, shift);
die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
    unless(defined $dst);
while(<>) {
    s/$src/$dst/g if 1 .. /^$/ and /^(Newsgroups|Followup-To|Xref):/i;
    print;
} continue {
    close ARGV if eof;
}

I have this in a textfile I created called "renamer.pl"

But before I execute it, I have a feeling that I need to supply the 
names of the groups on which I want to work.

To make it simple (testing one group for now), and to protect the 
working spool, I have copied my ~/articles/local/test files to a new 
directory, within the local.* directory. Clear as mud? Here were the steps:

news@optima2:~/articles/local/test$ ls
1   100  103  108  11   111  13  15  17  20  22  24  26  28  3   31  33  
35  8  96
10  101  107  109  110  12   14  16  2   21  23  25  27  29  30  32  34  
36  9  99
news@optima2:~/articles/local/test$ cd ..
news@optima2:~/articles/local$ ls
announce  test
news@optima2:~/articles/local$ mkdir test1
news@optima2:~/articles/local$ ls
announce  test  test1
news@optima2:~/articles/local$ cd test
news@optima2:~/articles/local/test$ cp * ../test1
news@optima2:~/articles/local/test$ cd ../test1
news@optima2:~/articles/local/test1$ ls
news@optima2:~/articles/local/test1$ ls
1   100  103  108  11   111  13  15  17  20  22  24  26  28  3   31  33  
35  8  96
10  101  107  109  110  12   14  16  2   21  23  25  27  29  30  32  34  
36  9  99

The "renamer.pl" script was put into the test1 directory. I don't know 
if that is a good place for it or not.

Now, the question(s) I have:

Where in these two lines do I change the variables to "test" and "test1":

    my ($src, $dst) = (shift, shift);
    die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
        unless(defined $dst);


Would they be "oldgroup" and "newgroup" becoming "test" and "test1"?

Such as:

die "Usage: $0 test test1 [file1 [file2 ...]]\n"

What is the "shift, shift" for? Are they the values for local variables 
$src and $dst?

And what are the optional [file 1 [file2 ...]] labels?

It would probably make it easier to visualize if this script had the 
test and test1 simply plugged in for me to see.

Finally, what could I do if I wanted to rename the header info in both 
local.announce and local.test (local.*)?

Or in ~/articles/* if these multiple directory changes are even 
possible? If not, I would be required to run the Perl script from within 
each directory in ~/articles ?

I'm doing this "lab assignment" on a retired server (optima2) so I won't 
wreck the online server. If it works out OK, I may rename the five 
original ("brisbee") groups to something more local, like the "xanadu.*" 
hierarchy, to keep from accidental leaking, etc., on the online server.

They were named over five years ago, so I can't go back to the beginning 
now, and I don't want to discard all of the history in these "local" 
groups. Having the local groups all under one hierarchy will also make 
it easier for the users to find them in their newsreader list, and may 
remind them that the other groups are pushed out to Usenet.

Today I noticed one user posting in the local group "computers" after he 
looked around for awhile in the Big Eight comp.* hierarchy. So it can be 
confusing, especially the computers group.

Either way, I'm bound to learn a little bit about Perl, and can use the 
lesson down the road.

TIA.

-- 
John
Re: Renaming a newsgroup
#74214
Author: Jeffrey M. Vinocur
Date: Sun, 10 Sep 2006 13:39
61 lines
3129 bytes
In article <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>Looking at Russ's "INN 2.x FAQ" Section 6.5 "Rename a newsgroup"
>
>But before I execute it, I have a feeling that I need to supply the 
>names of the groups on which I want to work.

*laugh*  I generally don't write scripts where you have to edit
the source code to make it work!

If you run the script with no arguments, it will give you usage
information.  (The usage information is that the first
commandline argument is the old group name, the second
commandline argument is the new group name, and all the others
are the files you want to modify.  So something like
`renamer.pl test test1 *` would probably do it.)


>Where in these two lines do I change the variables to "test" and "test1":
>
>    my ($src, $dst) = (shift, shift);
>    die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
>        unless(defined $dst);
>
>
>Would they be "oldgroup" and "newgroup" becoming "test" and "test1"?

This is just the line that prints out the usage information I was
alluding to above.  But it's $src and $dst that are the two
variables used in the rest of the script.  "oldgroup" and
"newgroup" are just pieces of text being used in the usage info.
You could change them to "archaicgroup" etc without altering
anything.


>die "Usage: $0 test test1 [file1 [file2 ...]]\n"
>
>What is the "shift, shift" for?

That gets the commandline arguments.  Try `perldoc -f shift`.


>And what are the optional [file 1 [file2 ...]] labels?

Those are the news articles on disk you want to modify.


>Finally, what could I do if I wanted to rename the header info in both 
>local.announce and local.test (local.*)?
>
>Or in ~/articles/* if these multiple directory changes are even 
>possible? If not, I would be required to run the Perl script from within 
>each directory in ~/articles ?

Er, you'd just run the script one time per move, with the
appropriate commandline arguments.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74217
Author: John F. Morse
Date: Sun, 10 Sep 2006 19:20
115 lines
4731 bytes
Jeffrey M. Vinocur wrote:

>In article <AiTMg.17827$QM6.1566@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>Looking at Russ's "INN 2.x FAQ" Section 6.5 "Rename a newsgroup"
>>
>>But before I execute it, I have a feeling that I need to supply the 
>>names of the groups on which I want to work.
>>    
>>
>
>*laugh*  I generally don't write scripts where you have to edit
>the source code to make it work!
>
>If you run the script with no arguments, it will give you usage
>information.  (The usage information is that the first
>commandline argument is the old group name, the second
>commandline argument is the new group name, and all the others
>are the files you want to modify.  So something like
>`renamer.pl test test1 *` would probably do it.)
>  
>


Sorry about that. ;-)

I tried this and it does work.

The rest of this message is understood as well. Thanks for pointing out 
these things.

Two more questions....

1. Where would you suggest I put the Perl script (since news must run 
this, perhaps pathbin)? Would you run it from within each group's 
directory to be modified (within the oldgroup or newgroup directory), or 
does it matter? I tried it from within the newgroup directory, where I 
also had the renamer.pl script, and it worked. But that requires moving 
the script, as well as cd to each newgroup directory. (This was actually 
a two-part question, 1A and 1B.) ;-)

2. Will the script change any occurrence of the oldgroup name should it 
appear in the body of an article following one of the three header 
fields in the if statement? I can't see where it is restricted to the 
header only, but I don't know Perl.


>>Where in these two lines do I change the variables to "test" and "test1":
>>
>>   my ($src, $dst) = (shift, shift);
>>   die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
>>       unless(defined $dst);
>>
>>
>>Would they be "oldgroup" and "newgroup" becoming "test" and "test1"?
>>    
>>
>
>This is just the line that prints out the usage information I was
>alluding to above.  But it's $src and $dst that are the two
>variables used in the rest of the script.  "oldgroup" and
>"newgroup" are just pieces of text being used in the usage info.
>You could change them to "archaicgroup" etc without altering
>anything.
>
>
>  
>
>>die "Usage: $0 test test1 [file1 [file2 ...]]\n"
>>
>>What is the "shift, shift" for?
>>    
>>
>
>That gets the commandline arguments.  Try `perldoc -f shift`.
>
>
>  
>
>>And what are the optional [file 1 [file2 ...]] labels?
>>    
>>
>
>Those are the news articles on disk you want to modify.
>
>
>  
>
>>Finally, what could I do if I wanted to rename the header info in both 
>>local.announce and local.test (local.*)?
>>
>>Or in ~/articles/* if these multiple directory changes are even 
>>possible? If not, I would be required to run the Perl script from within 
>>each directory in ~/articles ?
>>    
>>
>
>Er, you'd just run the script one time per move, with the
>appropriate commandline arguments.
>


That is as clear as Rocky Mountain air, now that I've read your 
explanation and also experimented. It sure went over my head earlier. I 
also had to apt-get perl-doc and was reading when you posted.

I've been up about 24 hours, so I'm going to go rest my eyes, brain and 
body and start fresh later this evening.

Thanks Jeff.

-- 
John
Re: Renaming a newsgroup
#74219
Author: Jeffrey M. Vinocur
Date: Sun, 10 Sep 2006 22:28
49 lines
3201 bytes
In article <RzZMg.99175$5i3.82988@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>1. Where would you suggest I put the Perl script (since news must run 
>this, perhaps pathbin)?

This is what I used to do, but then I realized that it make it
really confusing later on to figure out what was part of INN vs
something random I'd downloaded.  So when I wanted to migrate to
a new machine, I'd do a fresh install of INN and have to dig
through the bin directories to find the third-party stuff.

Now I have a separate place ($pathnews/custom) where I keep such
things, and if I feel like I'll use it frequently, I put a
symbolic link in $pathbin for convenience.


>Would you run it from within each group's directory to be
>modified (within the oldgroup or newgroup directory), or does it
>matter?

I certainly wouldn't move the script into each directory, that's
a waste of your time.  I'd keep the script in some stable
location as above.  (It's a matter of personal preference whether
you run the script from wherever but specify the path to the
articles you want to change, or go to wherever the articles are
and then run the script with just "*" as the last argument.)

Incidentally, if you have crossposts in the groups you're
renaming, you should include all the articles that might be
crossposted no matter which group (on disk) they're stored in.
There's no harm done (except a bit of prolonged execution time)
to include too many articles in the run.


>2. Will the script change any occurrence of the oldgroup name should it 
>appear in the body of an article following one of the three header 
>fields in the if statement? I can't see where it is restricted to the 
>header only, but I don't know Perl.

Nope.  The bit that says "1 .. /^$/" means that the script stops
after the empty line that separates the body from the headers.
It's a subtle bit of Perl, but if you're curious, you want the
section "Range operators" in `man perlop`.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74218
Author: John F. Morse
Date: Mon, 11 Sep 2006 06:53
84 lines
5071 bytes
Jeffrey M. Vinocur wrote:

>I certainly wouldn't move the script into each directory, that's
>a waste of your time.  I'd keep the script in some stable
>location as above.  (It's a matter of personal preference whether
>you run the script from wherever but specify the path to the
>articles you want to change, or go to wherever the articles are
>and then run the script with just "*" as the last argument.)
>
>Incidentally, if you have crossposts in the groups you're
>renaming, you should include all the articles that might be
>crossposted no matter which group (on disk) they're stored in.
>There's no harm done (except a bit of prolonged execution time)
>to include too many articles in the run.
>  
>

I think my problems would disappear if I use a full pathname to the 
directory where I want the script to work.

Now, as for the crossposts....

There are some crossposts in the original five groups, but not too many. 
Since I'm going to rename all five of the groups, will this take care of 
that problem?

I'm curious though: How will the script handle the crossposted group 
names in groups other than the one where it is executing? Will I need to 
run it five times in each group's directory, with the new group names? 
Or can I run it in the new hierarchy directory "xanadu" containing the 
five directories, with a wildcard? Wouldn't I still need to run it five 
times since there are five distinct group names?

What detrimental effect would result if a crossposted article was not 
correctly renamed? Would it be a silent error while serving the article 
to the reader? IOW, will it harm the server's operation, or simply log 
an error, which actually could make the identification of the article 
easier so it can be manually edited. I can see myself editing several 
years into the future as errors trickle in from failures. ;-)

I have too many articles in the original five groups to check manually. 
One group, brisbee, has over 34,000 articles alone. You can see the 
sizes below.


john@optima7:/var/spool/news/articles$ ls -l
total 961
drwxrwxr-x   4 news news    424 2006-07-15 00:00 alt
drwxrwxr-x   2 news news 815112 2006-09-01 20:14 brisbee
drwxrwxr-x  15 news news    384 2006-08-31 11:20 christnet
drwxrwxr-x  16 news news    408 2006-09-03 02:32 comp
drwxrwxr-x   2 news news  70056 2006-09-10 06:53 computers
drwxrwxr-x   3 news news     72 2006-06-18 12:22 control
drwxrwxr-x   4 news news    104 2006-07-15 13:07 humanities
drwxrwxr-x   5 news news    120 2006-09-04 10:30 local
drwxrwxr-x   7 news news    200 2006-07-15 00:00 misc
drwxrwxr-x   9 news news    216 2006-09-01 17:36 news
drwxrwxr-x   2 news news  20232 2006-06-18 12:25 petchat
drwxrwxr-x   2 news news   4848 2006-09-07 21:31 raucouscaucus
drwxrwxr-x  11 news news    288 2006-09-03 02:32 rec
drwxrwxr-x   3 news news     72 2006-09-07 04:56 sci
drwxrwxr-x   2 news news  66024 2006-06-18 12:24 soapbox
drwxrwxr-x   2 news news     72 2006-07-02 16:49 soc
drwxrwxr-x   4 news news    104 2006-06-23 17:07 talk


It seems modern newsreaders have lost their ability to see crossposted 
articles, and mark them read in all subscribed groups once they have 
been read in one group. Perhaps it is no longer a big issue, unless INN 
balks on it when running the nightly expire routines or running makehistory?


>Nope.  The bit that says "1 .. /^$/" means that the script stops
>after the empty line that separates the body from the headers.
>It's a subtle bit of Perl, but if you're curious, you want the
>section "Range operators" in `man perlop`.
>

Ah so. That explains it. I forgot about the blank line delimiter.

Thanks Jeff.

-- 
John
Re: Renaming a newsgroup
#74220
Author: Jeffrey M. Vinocur
Date: Mon, 11 Sep 2006 09:48
60 lines
3714 bytes
In article <OJ7Ng.103780$5i3.83664@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>I'm curious though: How will the script handle the crossposted group 
>names in groups other than the one where it is executing? Will I need to 
>run it five times in each group's directory, with the new group names? 
>Or can I run it in the new hierarchy directory "xanadu" containing the 
>five directories, with a wildcard? Wouldn't I still need to run it five 
>times since there are five distinct group names?

You need to do one run per old-name/new-name pair, but you can
include all the articles regardless of location (so you need five
runs, not twenty-five).  It would be fine to run the script five
times in the top-level directory after relocating the files as
you suggest (simply do `renamer.pl x y */*` to get all the files
in all the subdirectories).

Alternatively, you can run it in the existing directories, a
little more verbosely, by doing something like `renamer.pl x y
brisbee/* soapbox/* petchat/* ...` to list out all the articles
that way.  No matter as far as the script is concerned.


>What detrimental effect would result if a crossposted article was not 
>correctly renamed? Would it be a silent error while serving the article 
>to the reader? IOW, will it harm the server's operation, or simply log 
>an error, which actually could make the identification of the article 
>easier so it can be manually edited. I can see myself editing several 
>years into the future as errors trickle in from failures. ;-)

I suspect the article would be correctly visible in whichever of
the groups got renamed, and simply missing from those that
didn't.  It shouldn't hurt the server, though.


>john@optima7:/var/spool/news/articles$ ls -l

Incidentally, the sizes you see reported there are not very
meaningful -- they're just the sizes of the index structures
required to keep track of each directory.  You probably want to
do `du -sck *` or `du -sch *` instead.


>It seems modern newsreaders have lost their ability to see crossposted 
>articles, and mark them read in all subscribed groups once they have 
>been read in one group.

Depends on the newsreader, I guess.  I use trn, which does this
without issue.


>Perhaps it is no longer a big issue, unless INN balks on it when
>running the nightly expire routines or running makehistory?

I'm not sure what you're asking here.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74222
Author: John F. Morse
Date: Mon, 11 Sep 2006 11:12
141 lines
6211 bytes
Jeffrey M. Vinocur wrote:

>In article <OJ7Ng.103780$5i3.83664@bgtnsc04-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>I'm curious though: How will the script handle the crossposted group 
>>names in groups other than the one where it is executing? Will I need to 
>>run it five times in each group's directory, with the new group names? 
>>Or can I run it in the new hierarchy directory "xanadu" containing the 
>>five directories, with a wildcard? Wouldn't I still need to run it five 
>>times since there are five distinct group names?
>>    
>>
>
>You need to do one run per old-name/new-name pair, but you can
>include all the articles regardless of location (so you need five
>runs, not twenty-five).  It would be fine to run the script five
>times in the top-level directory after relocating the files as
>you suggest (simply do `renamer.pl x y */*` to get all the files
>in all the subdirectories).
>
>Alternatively, you can run it in the existing directories, a
>little more verbosely, by doing something like `renamer.pl x y
>brisbee/* soapbox/* petchat/* ...` to list out all the articles
>that way.  No matter as far as the script is concerned.
>  
>


Good morning, Jeff.

Sounds pretty simple, especially the first suggestion. Just run it 
inside the xanadu directory, once for each x y pair of the name of the 
oldgroup and the newgroup such as:

perl renamer.pl brisbee xanadu.brisbee */*
perl renamer.pl computers xanadu.computers */*
perl renamer.pl petchat xanadu.petchat */*
perl renamer.pl raucouscaucus xanadu.raucouscaucus */*
perl renamer.pl soapbox xanadu.soapbox */*
perl renamer.pl local.announce xanadu.announce */*
perl renamer.pl local.info xanadu.info */*
perl renamer.pl local.test xanadu.test */*

These can probably be copied right into BASH.

Thanks.


>>What detrimental effect would result if a crossposted article was not 
>>correctly renamed? Would it be a silent error while serving the article 
>>to the reader? IOW, will it harm the server's operation, or simply log 
>>an error, which actually could make the identification of the article 
>>easier so it can be manually edited. I can see myself editing several 
>>years into the future as errors trickle in from failures. ;-)
>>    
>>
>
>I suspect the article would be correctly visible in whichever of
>the groups got renamed, and simply missing from those that
>didn't.  It shouldn't hurt the server, though.
>  
>


That eliminates a lot of worry.


>Incidentally, the sizes you see reported there are not very
>meaningful -- they're just the sizes of the index structures
>required to keep track of each directory.  You probably want to
>do `du -sck *` or `du -sch *` instead.
>  
>


Actually, I was fishing for a command to get a listing of the "count" of 
individual files. I found nothing for ls, dir, or vdir. I can get a file 
count using an X file manager, but I can't do that remotely, or very 
well from the slow 233 MHz news2 server. GUI file managers use some 
command which I should be able to use from BASH. I find nothing in 
apropos to use for summing the file count.

Just for your info, here's what I came up with:

john@optima7:/var/spool/news/articles$ du -sck *
26288   alt
357845  brisbee
219     christnet
143533  comp
26409   computers
33      control
9685    humanities
62      local
5815    misc
283207  news
15084   petchat
3633    raucouscaucus
50431   rec
2       sci
27969   soapbox
5       soc
2286    talk
1       test
952503  total


>>Perhaps it is no longer a big issue, unless INN balks on it when
>>running the nightly expire routines or running makehistory?
>>    
>>
>
>I'm not sure what you're asking here.
>  
>


I was just wondering what makehistory (or whatever reads every article's 
header) might do when it encountered articles with invalid Xref groups. 
But after some additional caffeine, I presume it would ignore those 
groups, as it does anyway when an article was crossposted to groups on a 
peer, and are not in the active file on the local server.

I'm going to try all of this on the old news2 server and see how it 
flys. Then tomorrow (?) I can do it on the news7 server. I'm backing up 
the eight groups into the empty archive folder -- just in case I goof 
and I need them later.

It might be smarter to simply copy the eight directories into the xanadu 
directory, and run the script on those directories. That way I'd still 
have the old structure available for use until I'm sure the new group 
names are working correctly. Then I could use ctlinnd rmgroup the old 
groups, and then rm their directories.

Can you tell I'm more of a planner than an attacker? ;-)

Thanks again.

-- 
John
Re: Renaming a newsgroup
#74223
Author: Dr.Ruud
Date: Mon, 11 Sep 2006 14:11
23 lines
1734 bytes
John F. Morse schreef:

> #!/usr/bin/perl -wi
> my ($src, $dst) = (shift, shift);
> die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
>     unless(defined $dst);
> while(<>) {
>     s/$src/$dst/g if 1 .. /^$/ and /^(Newsgroups|Followup-To|Xref):/i;

If $src can contain regex-special characters like .?*+{[^$@
then change that substitution to

     s/\Q$src/$dst/g

The \Q will quote all non-word-characters, see perlre and perlop and
quotemeta().

-- 
Affijn, Ruud

"Gewoon is een tijger."

Re: Renaming a newsgroup
#74224
Author: John F. Morse
Date: Mon, 11 Sep 2006 15:16
56 lines
3169 bytes
John F. Morse wrote:

Jeff,

These wouldn't work:

> perl renamer.pl brisbee xanadu.brisbee */*
> perl renamer.pl computers xanadu.computers */*
> perl renamer.pl petchat xanadu.petchat */*
> perl renamer.pl raucouscaucus xanadu.raucouscaucus */*
> perl renamer.pl soapbox xanadu.soapbox */*
> perl renamer.pl local.announce xanadu.announce */*
> perl renamer.pl local.info xanadu.info */*
> perl renamer.pl local.test xanadu.test */*



It seems the script does not like a wildcard for the directory (*/*).

I was getting an "Argument list too long" failure. (But, see below.)

I did get the script to work by using (from within the articles/xanadu 
directory):

~/renamer.pl oldgroup newgroup directory/*

For instance, specifying the directory:

~/renamer.pl computers xanadu.computers computers/*

(It will also works from within the group directory with the single 
wildcard, but I only tested this on one small group.)

The last group I tried to rename (brisbee) failed. I received "Argument 
list too long" for the brisbee group.

I think this big group was causing the earlier failure noted above with 
the "*/*" directory wildcard -- it couldn't get past the brisbee group.

This group has 33,960 articles.

Is there a 16 bit (32767) limitation?

Suggestions?

Split the group's files into two (or more) directories, run renamer.pl 
in each directory, then combine all files back into the xanadu.brisbee 
directory? This might possibly work, although the next smaller group 
only had 2902 articles.

I'll let it set until I hear from you, just in case you want to try a 
Perl script modification, and want me to test it.

-- 
John
Re: Renaming a newsgroup
#74225
Author: John F. Morse
Date: Mon, 11 Sep 2006 15:25
37 lines
2205 bytes
Dr.Ruud wrote:

>John F. Morse schreef:
>
>  
>
>>#!/usr/bin/perl -wi
>>my ($src, $dst) = (shift, shift);
>>die "Usage: $0 oldgroup newgroup [file1 [file2 ...]]\n"
>>    unless(defined $dst);
>>while(<>) {
>>    s/$src/$dst/g if 1 .. /^$/ and /^(Newsgroups|Followup-To|Xref):/i;
>>    
>>
>
>If $src can contain regex-special characters like .?*+{[^$@
>then change that substitution to
>
>     s/\Q$src/$dst/g
>
>The \Q will quote all non-word-characters, see perlre and perlop and
>quotemeta().
>


I presume you include the period (the first character, just before the ? 
mark above)? My eyes aren't that good -- maybe it is a comma?

If it is a period, I have successfully renamed groups from 
local.announcement and local.test to xanadu.announce and xanadu.test 
using Jeff's "s/$src/$dst/g" example.

I don't pretend to know anything about Perl (wish I did), but I just 
wanted to let you know of my test results.

-- 
John
Re: Renaming a newsgroup
#74227
Author: Dr.Ruud
Date: Mon, 11 Sep 2006 20:36
32 lines
2106 bytes
John F. Morse schreef:
> Dr.Ruud:

>> [s/$src/$dst/g]
>>
>>  s/\Q$src/$dst/g
>>
>> The \Q will quote all non-word-characters, see perlre and perlop and
>> quotemeta().
>
> I presume you include the period (the first character, just before
> the ? mark above)? My eyes aren't that good -- maybe it is a comma?
>
> If it is a period, I have successfully renamed groups from
> local.announcement and local.test to xanadu.announce and xanadu.test
> using Jeff's "s/$src/$dst/g" example.
>
> I don't pretend to know anything about Perl (wish I did), but I just
> wanted to let you know of my test results.

Why run a risk when there is no need to?

Yes, the dot is one of the characters that gets escaped, so that it
doesn't mean 'any character' anymore. This often won't change the
result, because a dot also matches a dot. So you need better tests.:)

-- 
Affijn, Ruud

"Gewoon is een tijger."

Re: Renaming a newsgroup
#74234
Author: Jeffrey M. Vinocur
Date: Tue, 12 Sep 2006 14:25
49 lines
3159 bytes
In article <b5fNg.106750$5i3.29042@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>perl renamer.pl [...]

Incidentally, if you `chmod a+x renamer.pl` (and make sure the
first line of the script points to where Perl actually is on your
system), you can run this without needing the "perl" in front.


>I was getting an "Argument list too long" failure. [...]
>
>I'll let it set until I hear from you, just in case you want to try a 
>Perl script modification, and want me to test it.

Oh, I probably ought to make the script smart enough to recurse
into directories itself, since people probably almost always run
it on a whole directory of files.  But I probably won't bother,
because...

This is a common problem of the shell's argument processing, that
manifests with many programs that take a very long list of files
as input.  The workaround (assuming the program can be run on
subsets of the files without the details/orders of the arguments
being important) is to do something like this:

    find . -type f -print | xargs renamer.pl oldgroup newgroup

which will run renamer.pl repeatedly on different batches of
input files.  The "." after find is the path to start looking in
(here, the current directory), -type f means only true files (not
directories etc), and -print is usually not necessary but tells
find to output the list of files it located, one per line.

You should know that the above command won't work with special
characters (including white space) in filenames.  That's not a
problem here, but for future reference, the safer invocation is:

    find . -type f -print0 | xargs -0 renamer.pl oldgroup newgroup

or whatever.  That uses a special delimiter so xargs doesn't have
to guess how to separate out the filenames.  However, not all
versions of find/xargs know how to do this, so you can't rely on
it always being available.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74235
Author: Jeffrey M. Vinocur
Date: Tue, 12 Sep 2006 14:28
19 lines
1686 bytes
In article <ee42fj.188.1@news.isolution.nl>,
Dr.Ruud <rvtol+news@isolution.nl> wrote:
>John F. Morse schreef:
>
>>     s/$src/$dst/g if 1 .. /^$/ and /^(Newsgroups|Followup-To|Xref):/i;
>
>If $src can contain regex-special characters like .?*+{[^$@
>then change that substitution to
>
>     s/\Q$src/$dst/g

That's an excellent point.  I guess it depends whether or not we
want to allow users to make wildcard-based substitutions.  I
think that might actually be useful in this case...hmm.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74236
Author: John F. Morse
Date: Tue, 12 Sep 2006 16:01
196 lines
8073 bytes
Jeffrey M. Vinocur wrote:

>In article <b5fNg.106750$5i3.29042@bgtnsc04-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>perl renamer.pl [...]
>>    
>>
>
>Incidentally, if you `chmod a+x renamer.pl` (and make sure the
>first line of the script points to where Perl actually is on your
>system), you can run this without needing the "perl" in front.
>  
>


Noted. I'll make this chmod. Thanks.


>>I was getting an "Argument list too long" failure. [...]
>>
>>I'll let it set until I hear from you, just in case you want to try a 
>>Perl script modification, and want me to test it.
>>    
>>
>
>Oh, I probably ought to make the script smart enough to recurse
>into directories itself, since people probably almost always run
>it on a whole directory of files.  But I probably won't bother,
>because...
>
>This is a common problem of the shell's argument processing, that
>manifests with many programs that take a very long list of files
>as input.  The workaround (assuming the program can be run on
>subsets of the files without the details/orders of the arguments
>being important) is to do something like this:
>
>    find . -type f -print | xargs renamer.pl oldgroup newgroup
>
>which will run renamer.pl repeatedly on different batches of
>input files.  The "." after find is the path to start looking in
>(here, the current directory), -type f means only true files (not
>directories etc), and -print is usually not necessary but tells
>find to output the list of files it located, one per line.
>
>You should know that the above command won't work with special
>characters (including white space) in filenames.  That's not a
>problem here, but for future reference, the safer invocation is:
>
>    find . -type f -print0 | xargs -0 renamer.pl oldgroup newgroup
>
>or whatever.  That uses a special delimiter so xargs doesn't have
>to guess how to separate out the filenames.  However, not all
>versions of find/xargs know how to do this, so you can't rely on
>it always being available.
>

I'll try this on the copied (backup) set of the original directories 
(groups) on news2 after I finish the makehistory and test what I've done 
so far. I'll also make Dr.Ruud's change to the script.

I couldn't locate my notes of a year ago, so I tried "makehistory -b -f 
history.n -I -O" and will see if that works after renaming to remove the 
.n in the four filenames.

Recursing into the directories is one problem that was overcome by 
supplying each directory name. (See the session below.)

However the "Argument list too long" failures were due to too many 
filenames, or possibly too much data -- data being too many filenames. 
Perhaps the 128 MB of RAM is not enough for the complete file?

I read something about "slurping" in perlintro(1):

"Reading in the whole file at one time is called slurping. It can be 
useful but it may be a memory hog. Most text file processing can be done 
a line at a time with Perl's looping constructs."

This looping might be the fix needed if the script did indeed try to 
read in all of the filenames.

I don't know -- I'm a very beginning Perl user, and not a programmer by 
a long shot.

Or, as you stated a shell problem. This Debian install uses sh for user 
news. I wonder if bash would be better?

Below is the session to rename the groups. I ran "time" on each command 
to see how long each took.

As you can see, I had the  "Argument list too long" failure until I 
tried renaming by just the first numeral of the files. Then it worked 
fine until I got down to the 2* filenames. There were too many 2* files, 
so I had to break this down into smaller (tenths) groups of files.

Not shown are times for files from 9* down to 6* because the highest 
numbered article is 47283. So I timed 5* for a small group, then 
proceeded downward.

The 2* group failed, but surprisingly the 1* ran without error. I 
suspect this is because of a loss of a lot of the early messages on the 
RumorMill server back on January 30-31, 2002. I had used pullnews with 
inn.conf xrefslave set to true to keep the article numbers the same when 
I pulled them into INN last year.

sh-2.05b$ pwd
/var/spool/news/articles/xanadu
sh-2.05b$ perl ~/renamer.pl test xanadu.test */*
sh: /usr/bin/perl: Argument list too long
sh-2.05b$ perl ~/renamer.pl brisbee xanadu.brisbee brisbee/*
sh: /usr/bin/perl: Argument list too long
sh-2.05b$ perl ~/renamer.pl brisbee xanadu.brisbee brisbee/9*
sh-2.05b$ perl ~/renamer.pl brisbee xanadu.brisbee brisbee/8*
sh-2.05b$ perl ~/renamer.pl brisbee xanadu.brisbee brisbee/7*
sh-2.05b$ perl ~/renamer.pl brisbee xanadu.brisbee brisbee/6*
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/5*

real    0m9.168s
user    0m3.160s
sys     0m2.820s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/4*

real    2m37.374s
user    0m37.390s
sys     0m21.020s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/3*

real    0m43.336s
user    0m18.620s
sys     0m10.490s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/2*
sh: /usr/bin/perl: Argument list too long

real    0m1.142s
user    0m0.800s
sys     0m0.120s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/1*

real    0m1.115s
user    0m0.800s
sys     0m0.080s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/20*

real    0m10.458s
user    0m3.960s
sys     0m2.810s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/21*

real    0m8.204s
user    0m3.480s
sys     0m2.530s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/22*

real    0m8.998s
user    0m3.400s
sys     0m2.220s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/23*

real    0m8.710s
user    0m3.720s
sys     0m2.280s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/24*

real    0m9.350s
user    0m3.550s
sys     0m2.350s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/25*

real    0m11.363s
user    0m4.430s
sys     0m2.670s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/26*

real    0m10.375s
user    0m4.840s
sys     0m2.550s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/27*

real    0m13.210s
user    0m5.200s
sys     0m2.700s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/28*

real    0m11.433s
user    0m5.330s
sys     0m2.500s
sh-2.05b$ time perl ~/renamer.pl brisbee xanadu.brisbee brisbee/29*

real    0m8.835s
user    0m4.120s
sys     0m2.320s


-- 
John
Re: Renaming a newsgroup
#74237
Author: Jeffrey M. Vinocur
Date: Tue, 12 Sep 2006 16:30
30 lines
2358 bytes
In article <OwbNg.22657$QM6.20750@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>Actually, I was fishing for a command to get a listing of the "count" of 
>individual files. I found nothing for ls, dir, or vdir.

Ah.  I don't know if there's a standard tool.  I would do this:

    find . -type f | perl -wpe 's@^([^/])*/([^/]*)/.*@$2@' | uniq -c


>I was just wondering what makehistory (or whatever reads every article's 
>header) might do when it encountered articles with invalid Xref groups. 
>But after some additional caffeine, I presume it would ignore those 
>groups, as it does anyway when an article was crossposted to groups on a 
>peer, and are not in the active file on the local server.

I presume so to.

When an article comes in, INN reconstructs the Xref header to
only include those groups it carries.  But if you try to rebuild
and the Xref header has an old group, well, I suspect it would
ignore it too.  It might error, but it would error immediately;
regardless you won't end up with an unstable database that could
cause you trouble later.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74238
Author: John F. Morse
Date: Tue, 12 Sep 2006 17:48
94 lines
4670 bytes
Jeffrey M. Vinocur wrote:

>In article <OwbNg.22657$QM6.20750@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>Actually, I was fishing for a command to get a listing of the "count" of 
>>individual files. I found nothing for ls, dir, or vdir.
>>    
>>
>
>Ah.  I don't know if there's a standard tool.  I would do this:
>
>    find . -type f | perl -wpe 's@^([^/])*/([^/]*)/.*@$2@' | uniq -c
>  
>


That seems to give an accurate count. It agrees with the count I 
obtained a couple of days ago using a GUI file manager (nautilus):

news@optima2:~/archive/articles/xanadu$ find . -type f | perl -wpe 
's@^([^/])*/([^/]*)/.*@$2@' | uniq -c
     40 test
      1 announce
    201 raucouscaucus
   2902 computers
   2749 soapbox
    841 petchat
  33960 brisbee

Thanks for the script.


>>I was just wondering what makehistory (or whatever reads every article's 
>>header) might do when it encountered articles with invalid Xref groups. 
>>But after some additional caffeine, I presume it would ignore those 
>>groups, as it does anyway when an article was crossposted to groups on a 
>>peer, and are not in the active file on the local server.
>>    
>>
>
>I presume so to.
>
>When an article comes in, INN reconstructs the Xref header to
>only include those groups it carries.  But if you try to rebuild
>and the Xref header has an old group, well, I suspect it would
>ignore it too.  It might error, but it would error immediately;
>regardless you won't end up with an unstable database that could
>cause you trouble later.
>


I do see articles with Newsgroups, Follow-up-To and Xref (in some of the 
brisbee articles, anyway) showing other crossposted groups that were not 
renamed with the "xanadu." in front of the group names. These messages 
do not appear in those other groups.

Perhaps that is the reason the message counts are not the same in the 
old and the new hierarchies:

oldgroup           newgroup (xanadu.*)
brisbee     34140  x.brisbee     33780
computers    2988  x.computers    2816
control.cancel 57  empty
local.announce  1  x.announce        1
local.test     40  x.test           40
petchat       879  x.petchat       803
raucouscaucus 223  x.raucouscaucus 179
soapbox      2881  x.soapbox      2617

As you can see, these counts do not agree with the accurate count above. 
The oldgroups is higher, probably because of holes from canceled 
articles. The newgroups is lower, probably because of missing 
crossposted messages not showing up in the list of articles. The 
announce and test groups never had anything crossposted, and never 
anything canceled, so they match.

I guess I'll have to run the script in every directory, for every group 
-- the "25" I mentioned earlier. ;-)

Except it takes 18 passes in the large brisbee group (1*, 3*-9* and 
20*-29*). Plus four more passes through the other four directories (16). 
That's 34 passes. :-(

But first I'll try your "find . -type f -print0 | xargs -0 renamer.pl 
oldgroup newgroup" script and see if it can save me from the asylum. 
Actually, some sleep is needed first, since I've been at this for about 
16 hours now.

Again, thanks for bearing with me.

-- 
John
Re: Renaming a newsgroup
#74249
Author: Dr.Ruud
Date: Wed, 13 Sep 2006 00:58
28 lines
1955 bytes
Jeffrey M. Vinocur schreef:
> Dr.Ruud:
>> John F. Morse:

>>>     s/$src/$dst/g
>>
>> If $src can contain regex-special characters like .?*+{[^$@
>> then change that substitution to
>>
>>     s/\Q$src/$dst/g
>
> That's an excellent point.  I guess it depends whether or not we
> want to allow users to make wildcard-based substitutions.  I
> think that might actually be useful in this case...hmm.

For wildcard-based substitutions, I guess you need to support capturing
groups and backreferences. But to do both substitutions that John
mentioned in one unambiguous go, you need to know your PCRE:

$src: local\.(announce(?=ment$)|test(?=$)).*$
$dst: xanadu.$1

-- 
Affijn, Ruud

"Gewoon is een tijger."

Re: Renaming a newsgroup
#74256
Author: John F. Morse
Date: Thu, 14 Sep 2006 12:12
282 lines
12728 bytes
Good morning, Jeff.

I'd suggest reading all of this instead of spending time answering as 
you read. I may have included some clues further down that could save 
some time. It may also make understanding what I'm trying to convey a 
little easier. ;-)

Some of the following is an observation report on what I have done which 
worked, and then there are some questions, and finally there is one big 
problem. Not necessary in that order, since part of the following was a 
draft saved from yesterday, before I decided to try a few more ideas to 
see if I could find a solution (which I did on some items).

1.

After rebuilding the history and overview on the news2 server, I 
discovered that the history.hash and the history.index had grown by 100 
times the original size. Below shows the backed-up (*.orig) files for 
comparison with the new ones.


sh-2.05b$ ls -l
total 107814
-rw-rw-r--   1 news news      746 2006-09-11 08:36 active
-rw-r--r--   1 news news      435 2006-09-11 08:36 active.times
-rw-rw-r--   1 news news  3939763 2006-09-13 00:31 history
-rw-rw-r--   1 news news       51 2006-09-13 00:31 history.dir
-rw-rw-r--   1 news news       85 2006-09-03 02:20 history.dir.orig
-rw-rw-r--   1 news news 60000000 2006-09-13 00:31 history.hash
-rw-rw-r--   1 news news   652800 2006-09-03 01:45 history.hash.orig
-rw-rw-r--   1 news news 40000000 2006-09-13 00:31 history.index
-rw-rw-r--   1 news news   435200 2006-09-03 01:45 history.index.orig
-rw-rw-r--   1 news news  5321295 2006-09-03 01:46 history.orig
-rw-r--r--   1 news news      604 2006-02-16 21:44 newsgroups

sh-2.05b$ du -sch *
4.0K    active
4.0K    active.times
3.8M    history
4.0K    history.dir
4.0K    history.dir.orig
58M     history.hash
640K    history.hash.orig
39M     history.index
428K    history.index.orig
5.1M    history.orig
106M    total


These two files are nowhere near this size on the news7 server shown 
below for comparison, which additionally has over 100 Usenet groups.


john@news7:/var/lib/news$ ls -l
total 18954
-rw-rw-r--   1 news news     8394 2006-09-07 04:10 active
-rw-r--r--   1 news news     8922 2006-09-07 00:40 active.times
-rw-rw-r--   1 news news 14591599 2006-09-13 00:39 history
-rw-rw-r--   1 news news       95 2006-09-13 00:44 history.dir
-rw-rw-r--   1 news news  1379400 2006-09-13 00:04 history.hash
-rw-rw-r--   1 news news   919600 2006-09-13 00:04 history.index
-rw-r--r--   1 news news  2445204 2006-09-02 17:28 newsgroups

john@news7:/var/lib/news$ du -sch *
12K     active
12K     active.times
14M     history
4.0K    history.dir
1.4M    history.hash
900K    history.index
2.4M    newsgroups
19M     total


Any idea why these files grew so large after makehistory completed 
(using "makehistory -b -f history.n -I -O")?

Additionally, expireover took 28 minutes yesterday (Wednesday) morning 
for news2, usually taking around 35 seconds at most. Expiration is not 
used for these groups ("*:A:never:never:never). This was a report for 
the past 11 days since this server has been shut off (Daily Usenet 
report from Sep 3 01:43:56 to Sep 13 00:00:03).

The "Article lines processed 80930" looks double what it should be. 
Perhaps it was reading the backup spool "~/archive/articles" within the 
archive directory? Or the history database for the previous and current 
groups, or active (when this nightly expiration ran, I hadn't yet 
removed the old non-xanadu.oldgroups from active, although I did move 
them to archive.)

Expire messages:
expireover start Wed Sep 13 00:00:12 CDT 2006: ( -z/var/log/news/expire.rm -Z/var/log/news/expire.lowmark)
    Article lines processed    80930
    Articles dropped               0
    Overview index dropped         0
expireover end Wed Sep 13 00:28:00 CDT 2006
lowmarkrenumber begin Wed Sep 13 00:28:00 CDT 2006: (/var/log/news/expire.lowmark)
lowmarkrenumber end Wed Sep 13 00:28:01 CDT 2006
expire begin Wed Sep 13 00:28:31 CDT 2006: (-v1)
    Article lines processed    40212
    Articles retained          40212
    Entries expired                0
expire end Wed Sep 13 00:31:55 CDT 2006
	all done Wed Sep 13 00:31:55 CDT 2006


Tonight's for comparison -- down to 12 minutes:

Expire messages:
expireover start Thu Sep 14 00:00:11 CDT 2006: ( -z/var/log/news/expire.rm -Z/var/log/news/expire.lowmark)
    Article lines processed    40493
    Articles dropped               0
    Overview index dropped         0
expireover end Thu Sep 14 00:12:35 CDT 2006
lowmarkrenumber begin Thu Sep 14 00:12:35 CDT 2006: (/var/log/news/expire.lowmark)
lowmarkrenumber end Thu Sep 14 00:12:35 CDT 2006
expire begin Thu Sep 14 00:13:05 CDT 2006: (-v1)
    Article lines processed    40212
    Articles retained          40212
    Entries expired                0
expire end Thu Sep 14 00:18:14 CDT 2006
	all done Thu Sep 14 00:18:14 CDT 2006


------------------------------------------------------------------------

2.

I also had considerable trouble with oldgroup-to-newgroup renaming. 
Message counts were not the same as they were before running the 
renamer.pl script.

After examining several headers of articles in the spool, I discovered 
headers which appeared as "xanadu.xanadu.brisbee" etc. It may have been 
contributed to what Dr.Ruud discovered. So I changed the renamer.pl to 
include Dr.Ruud's idea, then I had to return and rename all groups to 
remove the double "xanadu." group names ("xanadu.xanadu.group 
xanadu.group"). This fixed all of the headers that I later sampled.

I was using "find . -type f -print0 | xargs -0 renamer.pl oldgroup 
newgroup" for the renaming, from the "~/articles/xanadu" directory, 
changing the oldgroup and newgroup variables for each of the groups.

------------------------------------------------------------------------

3.

I am satisfied the spool now has correct header information, but despite 
several different runs of makehistory, including deleting the overview 
files first, I cannot get the raucouscaucus group to show any articles 
(it does appear as a group, but with zero articles in a news reader).

The active file shows:

control 0000000000 0000000001 n
control.cancel 0000000111 0000000112 n
control.checkgroups 0000000000 0000000001 n
control.newgroup 0000000000 0000000001 n
control.rmgroup 0000000000 0000000001 n
junk 0000000000 0000000001 n
xanadu.brisbee 0000047283 0000000125 y
xanadu.computers 0000003549 0000000002 y
xanadu.petchat 0000000921 0000000010 y
xanadu.raucouscaucus 0000000239 0000000240 y
xanadu.soapbox 0000003719 0000000001 y
xanadu.test 0000000111 0000000001 y
xanadu.announce 0000000011 0000000011 y

I manually edited active (using vi) the raucouscaucus group low-water 
mark to 0000000001, but this did not help. The group still indicated 
zero articles in several news readers -- even after quitting them and 
deleting the news2 server's index files, and then recreating a news2 
server "account" in the newsreaders (Mozilla and Pan).

When I ran "ctlinnd renumber raucouscaucus" the active file again 
indicated a low-water mark of 0000000240 .

By the way, the default "ctlinnd renumber" or "ctlinnd renumber all" 
will not work as indicated in ctlinnd(8) to scan all groups:

renumber group
              Scan overview database for the specified newsgroup and 
update the low-water mark and hi-water mark in the active file.   
Regardless  of
              the  content of the overview database, the hi-water mark 
will not be decreased (decreasing it may cause duplicate article numbers 
to be
              assigned after a crash, which can cause serious problems 
with the tradspool storage method).  If group is  an  empty  string  
then  all
              newsgroups  are  scanned.

I have throttled and stopped the server several times, deleted the 
overview directory files (rm -r /var/spool/news/overview/*), ran 
"makehistory -b -f history.n -I -O", renamed the four history files to 
remove the ".n" (the "mv history.n.* history.*" also will not work), 
restarted the server, and I still have no raucouscaucus articles. I've 
then tried the "ctlinnd renumber raucouscaucus" with no changes other 
than the low-watermark increases to one more than the high-watermark -- 
i.e. xanadu.raucouscaucus is still "empty" in a news reader.

All other groups appear normal, both in displayed message count equals 
the actual file count in the spool, and in the header newsgroup names 
for Newsgroups|Followup-To|Xref. I suspected but could not find any 
extra characters (i.e. spaces) in the xanadu.raucouscaucus group name in 
the headers of the messages in the spool. There might be an invisible 
(<CTRL>) character, but I don't know how to locate one, other than 
trying to rename the group again, using a carefully-typed 
"xanadu.raucouscaucus" as the oldgroup name. If it didn't fly, then 
there must be something there that doesn't match the active file entry.

Another thought: Is makedbz required after running this renamer.pl and 
on a tradspool storage method, and if so, before or after makehistory?

Is "makehistory -b -f history.n -I -O" correct, and why are those 
history.hash and history.index files so huge?

Here is a telnet session that might offer a clue:

john@Wintergreen18:~$ telnet
telnet> o
(to) news2 119
Trying 192.168.0.25...
Connected to optima2.my.net.
Escape character is '^]'.
200 news2.my.net InterNetNews NNRP server INN 2.4.3 (20050407 
prerelease) ready (posting ok).
authinfo user myname
381 PASS required
authinfo pass mypassword
281 Ok
mode reader
200 news2.my.net InterNetNews NNRP server INN 2.4.3 (20050407 
prerelease) ready (posting ok).

list
215 Newsgroups in form "group high low flags".
control.cancel 0000000111 0000000112 n
xanadu.brisbee 0000047283 0000000125 y
xanadu.computers 0000003549 0000000002 y
xanadu.petchat 0000000921 0000000010 y
xanadu.raucouscaucus 0000000239 0000000240 y
xanadu.soapbox 0000003719 0000000001 y
xanadu.test 0000000111 0000000001 y
xanadu.announce 0000000011 0000000011 y
..
group xanadu.raucouscaucus
211 0 0 0 xanadu.raucouscaucus
listgroup xanadu.raucouscaucus
411 No such group xanadu.raucouscaucus
quit
205 .
Connection closed by foreign host.


That 411 message is some kind of flag I'm sure.


Here's raucouscaucus:1 from the spool so you can see the header:

Path: optima2.my.net!192.168.0.20!news.my.net!user
Message-ID: <RumorMill--119937207333182048@mkc-65-28-28-81.kc.rr.com>
From: "Larry" <no.mail.gets@here.gov>
Newsgroups: 
xanadu.brisbee,xanadu.computers,xanadu.raucouscaucus,xanadu.soapbox
Subject: Brisbee street sweeper test one
Date: Sun, 3 Feb 2002 15:33:58 -0600
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: news.my.net (65.28.28.81)
X-Posting-Server: RumorMill 1.3.2
Xref: 192.168.0.20 xanadu.brisbee:130 xanadu.computers:2 
xanadu.raucouscaucus:1 xanadu.soapbox:1


TIA, and I hope this isn't one of my dyslexia things.

-- 
John
Re: Renaming a newsgroup
#74286
Author: John F. Morse
Date: Tue, 26 Sep 2006 17:43
303 lines
13668 bytes
Jeff,

I have not seen your reply to this article, originally posted nearly two 
weeks ago. I figured you may have been on vacation. Now I wonder if you 
may have replied, but the article didn't appear on my ISP's server.

There are questions in items 1 and 3, and I had hoped for some 
explanation for item 2.

TIA

-- 
John

John F. Morse wrote:

> Good morning, Jeff.
>
> I'd suggest reading all of this instead of spending time answering as 
> you read. I may have included some clues further down that could save 
> some time. It may also make understanding what I'm trying to convey a 
> little easier. ;-)
>
> Some of the following is an observation report on what I have done 
> which worked, and then there are some questions, and finally there is 
> one big problem. Not necessary in that order, since part of the 
> following was a draft saved from yesterday, before I decided to try a 
> few more ideas to see if I could find a solution (which I did on some 
> items).
>
> 1.
>
> After rebuilding the history and overview on the news2 server, I 
> discovered that the history.hash and the history.index had grown by 
> 100 times the original size. Below shows the backed-up (*.orig) files 
> for comparison with the new ones.
>
>
> sh-2.05b$ ls -l
> total 107814
> -rw-rw-r--   1 news news      746 2006-09-11 08:36 active
> -rw-r--r--   1 news news      435 2006-09-11 08:36 active.times
> -rw-rw-r--   1 news news  3939763 2006-09-13 00:31 history
> -rw-rw-r--   1 news news       51 2006-09-13 00:31 history.dir
> -rw-rw-r--   1 news news       85 2006-09-03 02:20 history.dir.orig
> -rw-rw-r--   1 news news 60000000 2006-09-13 00:31 history.hash
> -rw-rw-r--   1 news news   652800 2006-09-03 01:45 history.hash.orig
> -rw-rw-r--   1 news news 40000000 2006-09-13 00:31 history.index
> -rw-rw-r--   1 news news   435200 2006-09-03 01:45 history.index.orig
> -rw-rw-r--   1 news news  5321295 2006-09-03 01:46 history.orig
> -rw-r--r--   1 news news      604 2006-02-16 21:44 newsgroups
>
> sh-2.05b$ du -sch *
> 4.0K    active
> 4.0K    active.times
> 3.8M    history
> 4.0K    history.dir
> 4.0K    history.dir.orig
> 58M     history.hash
> 640K    history.hash.orig
> 39M     history.index
> 428K    history.index.orig
> 5.1M    history.orig
> 106M    total
>
>
> These two files are nowhere near this size on the news7 server shown 
> below for comparison, which additionally has over 100 Usenet groups.
>
>
> john@news7:/var/lib/news$ ls -l
> total 18954
> -rw-rw-r--   1 news news     8394 2006-09-07 04:10 active
> -rw-r--r--   1 news news     8922 2006-09-07 00:40 active.times
> -rw-rw-r--   1 news news 14591599 2006-09-13 00:39 history
> -rw-rw-r--   1 news news       95 2006-09-13 00:44 history.dir
> -rw-rw-r--   1 news news  1379400 2006-09-13 00:04 history.hash
> -rw-rw-r--   1 news news   919600 2006-09-13 00:04 history.index
> -rw-r--r--   1 news news  2445204 2006-09-02 17:28 newsgroups
>
> john@news7:/var/lib/news$ du -sch *
> 12K     active
> 12K     active.times
> 14M     history
> 4.0K    history.dir
> 1.4M    history.hash
> 900K    history.index
> 2.4M    newsgroups
> 19M     total
>
>
> Any idea why these files grew so large after makehistory completed 
> (using "makehistory -b -f history.n -I -O")?
>
> Additionally, expireover took 28 minutes yesterday (Wednesday) morning 
> for news2, usually taking around 35 seconds at most. Expiration is not 
> used for these groups ("*:A:never:never:never). This was a report for 
> the past 11 days since this server has been shut off (Daily Usenet 
> report from Sep 3 01:43:56 to Sep 13 00:00:03).
>
> The "Article lines processed 80930" looks double what it should be. 
> Perhaps it was reading the backup spool "~/archive/articles" within 
> the archive directory? Or the history database for the previous and 
> current groups, or active (when this nightly expiration ran, I hadn't 
> yet removed the old non-xanadu.oldgroups from active, although I did 
> move them to archive.)
>
> Expire messages:
> expireover start Wed Sep 13 00:00:12 CDT 2006: ( 
> -z/var/log/news/expire.rm -Z/var/log/news/expire.lowmark)
>    Article lines processed    80930
>    Articles dropped               0
>    Overview index dropped         0
> expireover end Wed Sep 13 00:28:00 CDT 2006
> lowmarkrenumber begin Wed Sep 13 00:28:00 CDT 2006: 
> (/var/log/news/expire.lowmark)
> lowmarkrenumber end Wed Sep 13 00:28:01 CDT 2006
> expire begin Wed Sep 13 00:28:31 CDT 2006: (-v1)
>    Article lines processed    40212
>    Articles retained          40212
>    Entries expired                0
> expire end Wed Sep 13 00:31:55 CDT 2006
>     all done Wed Sep 13 00:31:55 CDT 2006
>
>
> Tonight's for comparison -- down to 12 minutes:
>
> Expire messages:
> expireover start Thu Sep 14 00:00:11 CDT 2006: ( 
> -z/var/log/news/expire.rm -Z/var/log/news/expire.lowmark)
>    Article lines processed    40493
>    Articles dropped               0
>    Overview index dropped         0
> expireover end Thu Sep 14 00:12:35 CDT 2006
> lowmarkrenumber begin Thu Sep 14 00:12:35 CDT 2006: 
> (/var/log/news/expire.lowmark)
> lowmarkrenumber end Thu Sep 14 00:12:35 CDT 2006
> expire begin Thu Sep 14 00:13:05 CDT 2006: (-v1)
>    Article lines processed    40212
>    Articles retained          40212
>    Entries expired                0
> expire end Thu Sep 14 00:18:14 CDT 2006
>     all done Thu Sep 14 00:18:14 CDT 2006
>
>
> ------------------------------------------------------------------------
>
> 2.
>
> I also had considerable trouble with oldgroup-to-newgroup renaming. 
> Message counts were not the same as they were before running the 
> renamer.pl script.
>
> After examining several headers of articles in the spool, I discovered 
> headers which appeared as "xanadu.xanadu.brisbee" etc. It may have 
> been contributed to what Dr.Ruud discovered. So I changed the 
> renamer.pl to include Dr.Ruud's idea, then I had to return and rename 
> all groups to remove the double "xanadu." group names 
> ("xanadu.xanadu.group xanadu.group"). This fixed all of the headers 
> that I later sampled.
>
> I was using "find . -type f -print0 | xargs -0 renamer.pl oldgroup 
> newgroup" for the renaming, from the "~/articles/xanadu" directory, 
> changing the oldgroup and newgroup variables for each of the groups.
>
> ------------------------------------------------------------------------
>
> 3.
>
> I am satisfied the spool now has correct header information, but 
> despite several different runs of makehistory, including deleting the 
> overview files first, I cannot get the raucouscaucus group to show any 
> articles (it does appear as a group, but with zero articles in a news 
> reader).
>
> The active file shows:
>
> control 0000000000 0000000001 n
> control.cancel 0000000111 0000000112 n
> control.checkgroups 0000000000 0000000001 n
> control.newgroup 0000000000 0000000001 n
> control.rmgroup 0000000000 0000000001 n
> junk 0000000000 0000000001 n
> xanadu.brisbee 0000047283 0000000125 y
> xanadu.computers 0000003549 0000000002 y
> xanadu.petchat 0000000921 0000000010 y
> xanadu.raucouscaucus 0000000239 0000000240 y
> xanadu.soapbox 0000003719 0000000001 y
> xanadu.test 0000000111 0000000001 y
> xanadu.announce 0000000011 0000000011 y
>
> I manually edited active (using vi) the raucouscaucus group low-water 
> mark to 0000000001, but this did not help. The group still indicated 
> zero articles in several news readers -- even after quitting them and 
> deleting the news2 server's index files, and then recreating a news2 
> server "account" in the newsreaders (Mozilla and Pan).
>
> When I ran "ctlinnd renumber raucouscaucus" the active file again 
> indicated a low-water mark of 0000000240 .
>
> By the way, the default "ctlinnd renumber" or "ctlinnd renumber all" 
> will not work as indicated in ctlinnd(8) to scan all groups:
>
> renumber group
>              Scan overview database for the specified newsgroup and 
> update the low-water mark and hi-water mark in the active file.   
> Regardless  of
>              the  content of the overview database, the hi-water mark 
> will not be decreased (decreasing it may cause duplicate article 
> numbers to be
>              assigned after a crash, which can cause serious problems 
> with the tradspool storage method).  If group is  an  empty  string  
> then  all
>              newsgroups  are  scanned.
>
> I have throttled and stopped the server several times, deleted the 
> overview directory files (rm -r /var/spool/news/overview/*), ran 
> "makehistory -b -f history.n -I -O", renamed the four history files to 
> remove the ".n" (the "mv history.n.* history.*" also will not work), 
> restarted the server, and I still have no raucouscaucus articles. I've 
> then tried the "ctlinnd renumber raucouscaucus" with no changes other 
> than the low-watermark increases to one more than the high-watermark 
> -- i.e. xanadu.raucouscaucus is still "empty" in a news reader.
>
> All other groups appear normal, both in displayed message count equals 
> the actual file count in the spool, and in the header newsgroup names 
> for Newsgroups|Followup-To|Xref. I suspected but could not find any 
> extra characters (i.e. spaces) in the xanadu.raucouscaucus group name 
> in the headers of the messages in the spool. There might be an 
> invisible (<CTRL>) character, but I don't know how to locate one, 
> other than trying to rename the group again, using a carefully-typed 
> "xanadu.raucouscaucus" as the oldgroup name. If it didn't fly, then 
> there must be something there that doesn't match the active file entry.
>
> Another thought: Is makedbz required after running this renamer.pl and 
> on a tradspool storage method, and if so, before or after makehistory?
>
> Is "makehistory -b -f history.n -I -O" correct, and why are those 
> history.hash and history.index files so huge?
>
> Here is a telnet session that might offer a clue:
>
> john@Wintergreen18:~$ telnet
> telnet> o
> (to) news2 119
> Trying 192.168.0.25...
> Connected to optima2.my.net.
> Escape character is '^]'.
> 200 news2.my.net InterNetNews NNRP server INN 2.4.3 (20050407 
> prerelease) ready (posting ok).
> authinfo user myname
> 381 PASS required
> authinfo pass mypassword
> 281 Ok
> mode reader
> 200 news2.my.net InterNetNews NNRP server INN 2.4.3 (20050407 
> prerelease) ready (posting ok).
>
> list
> 215 Newsgroups in form "group high low flags".
> control.cancel 0000000111 0000000112 n
> xanadu.brisbee 0000047283 0000000125 y
> xanadu.computers 0000003549 0000000002 y
> xanadu.petchat 0000000921 0000000010 y
> xanadu.raucouscaucus 0000000239 0000000240 y
> xanadu.soapbox 0000003719 0000000001 y
> xanadu.test 0000000111 0000000001 y
> xanadu.announce 0000000011 0000000011 y
> .
> group xanadu.raucouscaucus
> 211 0 0 0 xanadu.raucouscaucus
> listgroup xanadu.raucouscaucus
> 411 No such group xanadu.raucouscaucus
> quit
> 205 .
> Connection closed by foreign host.
>
>
> That 411 message is some kind of flag I'm sure.
>
>
> Here's raucouscaucus:1 from the spool so you can see the header:
>
> Path: optima2.my.net!192.168.0.20!news.my.net!user
> Message-ID: <RumorMill--119937207333182048@mkc-65-28-28-81.kc.rr.com>
> From: "Larry" <no.mail.gets@here.gov>
> Newsgroups: 
> xanadu.brisbee,xanadu.computers,xanadu.raucouscaucus,xanadu.soapbox
> Subject: Brisbee street sweeper test one
> Date: Sun, 3 Feb 2002 15:33:58 -0600
> Lines: 6
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
> NNTP-Posting-Host: news.my.net (65.28.28.81)
> X-Posting-Server: RumorMill 1.3.2
> Xref: 192.168.0.20 xanadu.brisbee:130 xanadu.computers:2 
> xanadu.raucouscaucus:1 xanadu.soapbox:1
>
>
> TIA, and I hope this isn't one of my dyslexia things.
>
Re: Renaming a newsgroup
#74288
Author: Jeffrey M. Vinocur
Date: Tue, 26 Sep 2006 22:51
13 lines
1647 bytes
In article <oFdSg.119491$QM6.76028@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>I have not seen your reply to this article, originally posted nearly two 
>weeks ago. I figured you may have been on vacation. Now I wonder if you 
>may have replied, but the article didn't appear on my ISP's server.

I missed it somehow.  Let me have a look.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74287
Author: Jeffrey M. Vinocur
Date: Tue, 26 Sep 2006 23:20
221 lines
10584 bytes
In article <kGbOg.40791$QM6.16542@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>1.
>
>After rebuilding the history and overview on the news2 server, I 
>discovered that the history.hash and the history.index had grown by 100 
>times the original size. Below shows the backed-up (*.orig) files for 
>comparison with the new ones.
>
>-rw-rw-r--   1 news news  3939763 2006-09-13 00:31 history
>-rw-rw-r--   1 news news       51 2006-09-13 00:31 history.dir
>-rw-rw-r--   1 news news       85 2006-09-03 02:20 history.dir.orig
>-rw-rw-r--   1 news news 60000000 2006-09-13 00:31 history.hash
>-rw-rw-r--   1 news news   652800 2006-09-03 01:45 history.hash.orig
>-rw-rw-r--   1 news news 40000000 2006-09-13 00:31 history.index
>-rw-rw-r--   1 news news   435200 2006-09-03 01:45 history.index.orig
>-rw-rw-r--   1 news news  5321295 2006-09-03 01:46 history.orig


>Any idea why these files grew so large after makehistory completed 
>(using "makehistory -b -f history.n -I -O")?

That is weird.

The index structures can always grow to accomodate an enlarging
history, but efficiency is best when they are preallocated to an
appropriate size.  So the code underlying makehistory/makedbz has
a number of options for guessing or allowing you to configure
this size (see the manpages for those two utilities).

It looks like your index files are over-allocated.  I'm not sure
why that occurred in the first place, but a quick makedbz run
should rebuild them at a more appropriate size.  You can run 
`wc -l history` to get an idea of how many articles you have at
present (assuming you trust your history file, or I guess
something like `find -type f -print | wc -l` in the spool
otherwise), and give that number as an approximate size with the
-s flag to makedbz.


You ask elsewhere in the post if you need to run makedbz.  I'm
always a little vague on that, because depending on the version
of INN, sometimes makehistory managed to do everything itself,
and sometimes makedbz was required afterwards.  When you finish a
makehistory run, if the timestamps on your .dir/.index/.hash
files are just as fresh as the history file itself (as they are
in your example above), then I would expect that makehistory has
just caused them to be regenerated.


>Additionally, expireover took 28 minutes yesterday (Wednesday) morning 
>for news2, usually taking around 35 seconds at most. Expiration is not 
>used for these groups ("*:A:never:never:never). This was a report for 
>the past 11 days since this server has been shut off (Daily Usenet 
>report from Sep 3 01:43:56 to Sep 13 00:00:03).

That's weird.  I wonder if your new history file index structures
are somehow so large they are inefficient to access.  Let's come
back to this if it persists when everything else is cleared up.


>The "Article lines processed 80930" looks double what it should be. 
>Perhaps it was reading the backup spool "~/archive/articles" within the 
>archive directory? Or the history database for the previous and current 
>groups, or active (when this nightly expiration ran, I hadn't yet 
>removed the old non-xanadu.oldgroups from active, although I did move 
>them to archive.)

Well, it's processing article lines in the history file there, so
that's the place to investigate.  You didn't use -a with
makehistory, I presume.  Perhaps you still somehow ended up with
duplicate files within spool/articles/ itself (it wouldn't have
read anything in spool/archive/articles/), or duplicate entries
in the history file (which would probably now have been cleared
up after generating thousands of lines in your news.notice log
file if you want to take a quick peek).


>2.
>
>I also had considerable trouble with oldgroup-to-newgroup renaming. 
>Message counts were not the same as they were before running the 
>renamer.pl script.

Message counts in the active file / overview database, or files
physically missing from disk?


>After examining several headers of articles in the spool, I discovered 
>headers which appeared as "xanadu.xanadu.brisbee" etc. It may have been 
>contributed to what Dr.Ruud discovered.

I suspect you inadvertently ran the script twice on the same
files, since that would have given exactly this symptom.  Each
time the script scans the file, it seels the "brisbee" part
(which matches what you supply for the oldgroup argument) and
adds the xanadu. as you directed.


>3.
>
>I am satisfied the spool now has correct header information, but despite 
>several different runs of makehistory, including deleting the overview 
>files first, I cannot get the raucouscaucus group to show any articles 
>(it does appear as a group, but with zero articles in a news reader).
>
>xanadu.raucouscaucus 0000000239 0000000240 y

Okay, this (along with the fact that playing with the watermarks
didn't fix it) means you need to check for problems with
overview.  Your almost certainly using tradspool, which means you
should look in spool/overview/x/r/ for the appropriate .DAT file.
(The files are organized by the initials of the components of the
newsgroup name, if you get what I mean.)

There should be one (very long) line per article in the group.
Each line starts with the article number and then has all of the
fields listed in your overview.fmt (separated by tabs).

(Look at a group that's working okay for comparison.)

Do you find a completely empty .DAT file for this group?  I
suspect you may.


>By the way, the default "ctlinnd renumber" or "ctlinnd renumber all" 
>will not work as indicated in ctlinnd(8) to scan all groups:

I don't understand what you mean by not working here.  I've
certainly used this functionality in the past.


>I have throttled and stopped the server several times, deleted the 
>overview directory files (rm -r /var/spool/news/overview/*), ran 
>"makehistory -b -f history.n -I -O", renamed the four history files to 
>remove the ".n" (the "mv history.n.* history.*" also will not work), 
>restarted the server, and I still have no raucouscaucus articles.

Oh wait, I wonder if you've got in some silly cycle by using the
-I flag to makehistory.  I never use that flag and would never
recommend it except for the very specific circumstance described
in the manpage.  So if your .DAT file is empty as I predicted
above, then try repeating the rebuild as you were doing but
without the -I flag.


And no, `mv history.n.* history.*` does not work; it's simply not
the semantics of the unix shell.  But that's a conversation for
another day.


>then tried the "ctlinnd renumber raucouscaucus" with no changes other 
>than the low-watermark increases to one more than the high-watermark -- 
>i.e. xanadu.raucouscaucus is still "empty" in a news reader.


>All other groups appear normal, both in displayed message count equals 
>the actual file count in the spool, and in the header newsgroup names 
>for Newsgroups|Followup-To|Xref. I suspected but could not find any 
>extra characters (i.e. spaces) in the xanadu.raucouscaucus group name in 
>the headers of the messages in the spool. There might be an invisible 
>(<CTRL>) character, but I don't know how to locate one, other than 
>trying to rename the group again, using a carefully-typed 
>"xanadu.raucouscaucus" as the oldgroup name. If it didn't fly, then 
>there must be something there that doesn't match the active file entry.

Well, there are two possibilities for this empty-appearing group.
One is that there is no overview entry (I think this is more
likely as discussed above).  In that case, there probably is a
perfectly good history entry, and you could check this by running

   grephistory '<RumorMill--119937207333182048@mkc-65-28-28-81.kc.rr.com>'

and seeing if you get a storage token back.  If you do, you could
pass it to the sm utility and hopefully get the article.  If that
works, then it's definitely an overview issue.  (The other
possibility is that there's something wrong with your active
file, but I think less likely.)


>Another thought: Is makedbz required after running this renamer.pl and 
>on a tradspool storage method, and if so, before or after makehistory?

As I was alluding to much above, makedbz is required any time you
make any changes to the history file, either manually or with
makehistory.  Except that nowadays I believe that makehistory
automatically runs the makedbz routines after each rebuild.


>xanadu.raucouscaucus 0000000239 0000000240 y

>group xanadu.raucouscaucus
>211 0 0 0 xanadu.raucouscaucus
>listgroup xanadu.raucouscaucus
>411 No such group xanadu.raucouscaucus
>quit
>205 .
>Connection closed by foreign host.
>
>That 411 message is some kind of flag I'm sure.

I forget what version of INN you're running, but I wonder if that
might be a subtle (and irrelevant) bug that has since been fixed.
Do you see the same behavior with other empty newsgroups?  Here's
mine for comparison:

200 news.litech.org InterNetNews NNRP server INN 2.4.3 ready (posting ok).
list active net.test
215 Newsgroups in form "group high low flags".
net.test 0000000606 0000000607 y
..
group net.test
list211 0 0 0 net.test
listgroup net.test
211 0 0 0 net.test


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Renaming a newsgroup
#74294
Author: John F. Morse
Date: Wed, 27 Sep 2006 17:44
121 lines
6517 bytes
Jeffrey M. Vinocur wrote:

Thanks for picking up on this Jeff.

I'll spend time going back through my notes and seeing if I can report 
on some of the items I discovered and was able to fix. Since this 
happened over two weeks ago, and I made many passes through makehistory 
and other fixes to the rename routine, I'll need a few days to review 
all of it to make sure I report accurately.

I will say that it took me several different tries before I finally got 
it to work correctly on the old news2 server. This server is still 
running but is no longer peering.

Then when I tried the same renaming of groups on the new news7 server, 
and running the makehistory, I ran across the same problems. However all 
were fixable, and the news7 server is now online and doing fine.

The original online news5 server was taken offline Sunday (port 
forwarding removed) but is also still running without peering.

With that in mind, I won't be able to try some of your ideas since 
everything is now up and running fine. My previous message just 
indicates the problems I encountered, and evidently was able to finally fix.

I still encountered one group with the doubling (the 
xanadu.xanadu.newgroupname) problem, which I fixed with another run on 
that group. I ran all groups the same way, but they didn't double. (This 
was a repeatable error on both servers.) I cannot explain why it errored 
(doubled) as I made no input errors to the group names. The problems 
were easily correctable by rerunning the renamer.pl using the errorname 
and goodname parameters.

Today I also see that the large history files have apparently repaired 
themselves on both servers:

john@optima2:/var/lib/news$ ls -al
total 10790
drwxrwxr-x   2 news news     488 2006-09-27 00:01 .
drwxr-xr-x  34 root root     856 2006-08-27 20:42 ..
-rw-rw-r--   1 news news     504 2006-09-15 10:33 active
-rw-rw-r--   1 news news     539 2006-09-13 01:35 active.old
-rw-r--r--   1 news news     435 2006-09-11 08:36 active.times
-rw-rw-r--   1 news news 3939763 2006-09-27 00:01 history
-rw-rw-r--   1 news news      84 2006-09-27 00:01 history.dir
-rw-rw-r--   1 news news      85 2006-09-03 02:20 history.dir.orig
-rw-rw-r--   1 news news  393216 2006-09-27 00:01 history.hash
-rw-rw-r--   1 news news  652800 2006-09-03 01:45 history.hash.orig
-rw-rw-r--   1 news news  262144 2006-09-27 00:01 history.index
-rw-rw-r--   1 news news  435200 2006-09-03 01:45 history.index.orig
-rw-rw-r--   1 news news 5321295 2006-09-03 01:46 history.orig
-rw-r--r--   1 news news      29 2006-09-27 00:01 .news.daily
-rw-r--r--   1 news news     641 2006-09-13 01:48 newsgroups


john@optima7:/var/lib/news$ ls -al
total 32594
drwxrwxr-x   2 news news      576 2006-09-27 00:26 .
drwxr-xr-x  35 root root      888 2006-09-01 06:52 ..
-rw-rw-r--   1 news news     8397 2006-09-16 15:06 active
-rw-rw-r--   1 news news     8397 2006-09-15 16:08 active.old
-rw-r--r--   1 news news     9016 2006-09-15 13:44 active.times
-rw-rw-r--   1 news news 12245117 2006-09-27 10:53 history
-rw-rw-r--   1 news news       96 2006-09-27 10:54 history.dir
-rw-rw-r--   1 news news       96 2006-09-16 07:50 history.dir.old
-rw-rw-r--   1 news news  1297800 2006-09-27 00:26 history.hash
-rw-rw-r--   1 news news  1461000 2006-09-16 00:05 history.hash.old
-rw-rw-r--   1 news news   865200 2006-09-27 00:26 history.index
-rw-rw-r--   1 news news   974000 2006-09-16 00:05 history.index.old
-rw-rw-r--   1 news news 13994631 2006-09-16 07:29 history.old
-rw-r--r--   1 news news       29 2006-09-27 00:27 .news.daily
-rw-r--r--   1 news news  2445205 2006-09-16 14:50 newsgroups

I think I'll edit this newsgroups file on news7 to thin it out like I 
did on news2 and news5, to contain only descriptions for groups I carry. 
It takes quite a long time to load using some news readers on some 
platforms where I've tested it.


>>xanadu.raucouscaucus 0000000239 0000000240 y
>>    
>>
>
>  
>
>>group xanadu.raucouscaucus
>>211 0 0 0 xanadu.raucouscaucus
>>listgroup xanadu.raucouscaucus
>>411 No such group xanadu.raucouscaucus
>>quit
>>205 .
>>Connection closed by foreign host.
>>
>>That 411 message is some kind of flag I'm sure.
>>    
>>
>
>I forget what version of INN you're running, but I wonder if that
>might be a subtle (and irrelevant) bug that has since been fixed.
>Do you see the same behavior with other empty newsgroups?  Here's
>mine for comparison:
>  
>

 From a little further up in this telnet session ("item #3"):

200 news2.my.net InterNetNews NNRP server INN 2.4.3 (20050407 
prerelease) ready (posting ok).

Just in case you wanted to look at this version. ;-)

I fixed this item with a manual (vi) edit of the active vi file before 
the makehistory run.

I'll check your original reply later (might be a few days) and see if 
there is anything additional I need to mention. For the next few days I 
will have a parade of home improvement people visiting for estimates, so 
I have little time for anything else.

-- 
John
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads