🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Claire Harrison Fri, 18 Sep 1998 00:00
How to synchronize two news servers
#31483
Author: Claire Harrison
Date: Fri, 18 Sep 1998 00:00
35 lines
2044 bytes
Greetings,

We are currently running Netscape's News server 3.5 under Dec Unix 4.0d
and are looking at migrating to innd 2.1

I have got the innd 2.1 server running on a separate Dec Unix 4.0d box
and it seems to be doing quite well.

But, how can I *seamlessly* migrate my customers from one server to
another.  The article numbering within the two servers seems to gets out
of sync even though the netscape server is the only feed for the innd
server and I started the innd server off with a copy of the active file
from the netscape server.  Between two netscape servers you can set one
up as a master and the other as a 'slave' server and it will keep the
article numbers in sync.  Is there an option for doing this between two
innd servers?

Because the article #s are out of sync, when I change which box is
refered to by the hostname 'news',  the reader connections lose track of
what articles they have read and what they haven't and (in some cases)
selecting an article by its header will display a totally different
article's body.

Right now, it looks like I would have to make my customers suffer
twice... once when I move them from the netscape server to the innd
server (a smaller test box) and again when I move them back to the
original hardware once it is upgraded to innd.

Does anyone have any suggestions?

Claire Harrison
Videotron Communications Ltd.


Re: How to synchronize two news servers
#31517
Author: Greg Andrews
Date: Sat, 19 Sep 1998 00:00
59 lines
2938 bytes
Claire Harrison <claire@videotron.ab.ca> writes:
>Greetings,
>
>We are currently running Netscape's News server 3.5 under Dec Unix 4.0d
>and are looking at migrating to innd 2.1
>
>I have got the innd 2.1 server running on a separate Dec Unix 4.0d box
>and it seems to be doing quite well.
>
>But, how can I *seamlessly* migrate my customers from one server to
>another.
>

I don't know if the Netscape server supports the INN master/slave
relationship between servers.  The master determines the article
numbering, and gives an "xreplic" feed to the slave.  The "xreplic"
feed (named after the NNTP command it uses) feeds the article number
to the slave in addition to the article itself.  The article numbers
are kept the same.

If you don't have that, the next best say is to increase the high
article numbers for all groups in the new server's active file.
As long as the new server's article numbers remain higher than
the old server's numbers, your users can switch to the new server
without losing any articles.  They can't switch back, though.

When you make users switch back to the original server (after INN
replaces Netscape), you can use either the master/slave method or
boost the article numbers on the original server again.

The main pitfall is choosing the right amount to boost the article
numbers.  You have to decide how long it will take for all of your
users to switch from the original server to the new server.  One
day?  A week?  A month?  You have to boost the article numbers on
the new server high enough that the original server will not catch
up during that transition period.

With some groups you can get away with boosting the article numbers
by only a couple thousand.  With other groups, you'll need to boost
them by ten thousand or more, particularly if your transition period
is longer than two or three days.

The field to adjust is the "himark" field on each line of your
active file.  For example:

   comp.dcom.modems 0000223049 0000191484 y
                    ^^^^^^^^^^
                        |
                        +-- This number is the "himark" field

It's not too hard to write an awk or perl script to boost the
number in that field by a certain amount.  Just remember to
preserve the leading zeroes in the number.  News depends on
having them there.


  -Greg

Re: How to synchronize two news servers
#31520
Author: Alexander Bochmann
Date: Sat, 19 Sep 1998 00:00
14 lines
1155 bytes
On Fri, 18 Sep 1998 14:28:38 -0600, Claire Harrison <claire@videotron.ab.ca> wrote:

 > from the netscape server.  Between two netscape servers you can set one
 > up as a master and the other as a 'slave' server and it will keep the
 > article numbers in sync.  Is there an option for doing this between two
 > innd servers?

As the Netscape News Server is basically inn, this should also work between 
Netscape and inn. Look up the -S switch in the innd manpage.

Alex.


Re: How to synchronize two news servers
#31525
Author: Per Hedeland
Date: Sat, 19 Sep 1998 00:00
35 lines
2091 bytes
In article <6u0gjn$9cf$1@shell1.ncal.verio.com>
gerg@shell1.ncal.verio.com (Greg Andrews) writes:
>Claire Harrison <claire@videotron.ab.ca> writes:
>>Greetings,
>>
>>We are currently running Netscape's News server 3.5 under Dec Unix 4.0d
>>and are looking at migrating to innd 2.1
>>
>>I have got the innd 2.1 server running on a separate Dec Unix 4.0d box
>>and it seems to be doing quite well.
>>
>>But, how can I *seamlessly* migrate my customers from one server to
>>another.
>>
>
>I don't know if the Netscape server supports the INN master/slave
>relationship between servers.  The master determines the article
>numbering, and gives an "xreplic" feed to the slave.  The "xreplic"
>feed (named after the NNTP command it uses) feeds the article number
>to the slave in addition to the article itself.  The article numbers
>are kept the same.

Well, INN 2.x supposedly supports the "xrefslave" method of replication,
where you can use a normal feed, and the only requirement is that the
sending server puts Xref: headers on *all* articles, not only the
crossposted ones - INN has been doing this since around 1.5 I believe,
don't know about the Netscape server. There is also some risk of
"backfill" (i.e. the articles on the receiver may not be created in
strictly ascending order) if a feed method that doesn't guarantee the
order of article transmission (e.g. innfeed) is used.

--Per Hedeland
per@erix.ericsson.se

Re: How to synchronize two news servers
#31555
Author: Claire Harrison
Date: Mon, 21 Sep 1998 00:00
81 lines
3785 bytes
Howdy,

It seems that I spoke too soon...

For those articles that are cross-posted, there is an Xref header and life is
good.

But, if the article isn't cross-posted then Netscape's News Server does not seem
to give it an Xref header so my inn 2.1 rejects it.  I suspect Netscape's news
server was based on inn 1.4 rather than 1.5.

Does anyone happen to know how to get Netscape News 3.5 to add an Xref header to
ALL articles?

Claire

Claire Harrison wrote:

> Greetings and Salutations,
>
> Thanks for all the help on this.... I *think* I've got it working... so far,
> the article #s appear to be the same on both boxes.  I have the Netscape
> server as the 'master' and inn 2.1 as the 'slave'.
>
> In summary: the Netscape News server supports the 'xreplic' mode of
> replication which appears to be consistent with INN 1.x using the -S flag on
> innd.  In this method, both the master and slave need to be configured to
> know about each other.
>
> The 2.x innd servers don't support the -S flag, but they can be configured
> as 'slave' by setting the xrefslave to true in inn.conf and also setting the
> nnrpdposthost to the hostname of the 'master' server.  The 'master' server
> then doesn't need to know it is a 'master' - it just sends the articles and
> the 'slave' server numbers them to match based on the XREF header in the
> article.
>
> We are using the 2nd method and so far, so good....
>
> Again, thanks for the help,
>
> Claire
>
> Claire Harrison wrote:
>
> > Greetings,
> >
> > We are currently running Netscape's News server 3.5 under Dec Unix 4.0d
> > and are looking at migrating to innd 2.1
> >
> > I have got the innd 2.1 server running on a separate Dec Unix 4.0d box
> > and it seems to be doing quite well.
> >
> > But, how can I *seamlessly* migrate my customers from one server to
> > another.  The article numbering within the two servers seems to gets out
> > of sync even though the netscape server is the only feed for the innd
> > server and I started the innd server off with a copy of the active file
> > from the netscape server.  Between two netscape servers you can set one
> > up as a master and the other as a 'slave' server and it will keep the
> > article numbers in sync.  Is there an option for doing this between two
> > innd servers?
> >
> > Because the article #s are out of sync, when I change which box is
> > refered to by the hostname 'news',  the reader connections lose track of
> > what articles they have read and what they haven't and (in some cases)
> > selecting an article by its header will display a totally different
> > article's body.
> >
> > Right now, it looks like I would have to make my customers suffer
> > twice... once when I move them from the netscape server to the innd
> > server (a smaller test box) and again when I move them back to the
> > original hardware once it is upgraded to innd.
> >
> > Does anyone have any suggestions?
> >
> > Claire Harrison
> > Videotron Communications Ltd.
> >
>


Re: How to synchronize two news servers
#31571
Author: bill davidsen
Date: Mon, 21 Sep 1998 00:00
22 lines
1692 bytes
In article <3602C276.7B16CFDB@videotron.ab.ca>,
Claire Harrison  <claire@videotron.ab.ca> wrote:

| But, how can I *seamlessly* migrate my customers from one server to
| another.  The article numbering within the two servers seems to gets out
| of sync even though the netscape server is the only feed for the innd
| server and I started the innd server off with a copy of the active file
| from the netscape server.  Between two netscape servers you can set one
| up as a master and the other as a 'slave' server and it will keep the
| article numbers in sync.  Is there an option for doing this between two
| innd servers?

Grep for "slave" in the inn.conf file.

--
bill davidsen (davidsen@tmr.com)
  "The action you see on fishing programs is something like the women
in _Playboy_. Not actually *fake*, but not remotely typical of the
average person's experience."  -me


Re: How to synchronize two news servers
#31576
Author: Claire Harrison
Date: Mon, 21 Sep 1998 00:00
63 lines
3158 bytes
Greetings and Salutations,

Thanks for all the help on this.... I *think* I've got it working... so far,
the article #s appear to be the same on both boxes.  I have the Netscape
server as the 'master' and inn 2.1 as the 'slave'.

In summary: the Netscape News server supports the 'xreplic' mode of
replication which appears to be consistent with INN 1.x using the -S flag on
innd.  In this method, both the master and slave need to be configured to
know about each other.

The 2.x innd servers don't support the -S flag, but they can be configured
as 'slave' by setting the xrefslave to true in inn.conf and also setting the
nnrpdposthost to the hostname of the 'master' server.  The 'master' server
then doesn't need to know it is a 'master' - it just sends the articles and
the 'slave' server numbers them to match based on the XREF header in the
article.

We are using the 2nd method and so far, so good....

Again, thanks for the help,

Claire


Claire Harrison wrote:

> Greetings,
>
> We are currently running Netscape's News server 3.5 under Dec Unix 4.0d
> and are looking at migrating to innd 2.1
>
> I have got the innd 2.1 server running on a separate Dec Unix 4.0d box
> and it seems to be doing quite well.
>
> But, how can I *seamlessly* migrate my customers from one server to
> another.  The article numbering within the two servers seems to gets out
> of sync even though the netscape server is the only feed for the innd
> server and I started the innd server off with a copy of the active file
> from the netscape server.  Between two netscape servers you can set one
> up as a master and the other as a 'slave' server and it will keep the
> article numbers in sync.  Is there an option for doing this between two
> innd servers?
>
> Because the article #s are out of sync, when I change which box is
> refered to by the hostname 'news',  the reader connections lose track of
> what articles they have read and what they haven't and (in some cases)
> selecting an article by its header will display a totally different
> article's body.
>
> Right now, it looks like I would have to make my customers suffer
> twice... once when I move them from the netscape server to the innd
> server (a smaller test box) and again when I move them back to the
> original hardware once it is upgraded to innd.
>
> Does anyone have any suggestions?
>
> Claire Harrison
> Videotron Communications Ltd.
>


Re: How to synchronize two news servers
#31685
Author: Hans Lambermont
Date: Thu, 24 Sep 1998 00:00
137 lines
4498 bytes
Claire Harrison wrote:
> It seems that I spoke too soon...
> For those articles that are cross-posted, there is an Xref header and life is
> good.
> 
> But, if the article isn't cross-posted then Netscape's News Server does not seem
> to give it an Xref header so my inn 2.1 rejects it.  I suspect Netscape's news
> server was based on inn 1.4 rather than 1.5.
> 
> Does anyone happen to know how to get Netscape News 3.5 to add an Xref header to
> ALL articles?

I think these will work for you: (addxref.pl and createbatch.pl)

-------------------------------------------------------------
#!/usr/local/bin/perl5
# Add Xref: header lines for articles that don't have them yet.
# This works for the so called traditional spool (INN oriented)
# Lateron use something like createbatch.pl to hand the existing article
# list to ao. innfeed. Crufted by Hans Lambermont newsmaster@philips.com

$pathname='fill_in_your_news_header_path';
# cd /your_news_spool && find . -type f -print | addxref.pl

$justtest=1;

&looparticles;

sub looparticles {
  while (<>) {
    chomp;
    if (/^.*\/\d*$/) {
      # only take number files
      $artfile = $_;
      &doarticle;
    } else {
      print "Ignore $_\n";
    }
  }
  exit 0;
}

sub doarticle {
  $header=1;
  $xreffound=0;
  open(ARTFILE,"$artfile") || die "Cant open $artfile : $!";
  open(NEWARTF,">${artfile}.new") || die "Cant create ${artfile}.new :
$!";
  while (<ARTFILE>) {
    if (/(^Xref:.*$)/) { 
      $xreffound=$1;
    }
    if (/Message-ID:\s+/) {
      $id=$';
      chomp $id;
    }
    if ($header) {
      if (/^$/) {
        # header end
        $header=0;
        if (! $xreffound) {
          $_ = $artfile;
          s@/@.@g;
          if ( ! /(^.*)\.(\d*$)/) {
            die "$artfile match error : $!";
          }
          $np = $1; $artname = $2;
          print "$artfile -> Xref: ${np}:${artname}\n";
          print NEWARTF "Xref: $pathname ${np}:${artname}\n\n";
        } else {
          print "Found Xref in $artfile : $xreffound\n";
          print NEWARTF $_;             
        }
      } else {
        print NEWARTF $_;               
      }
    } else {
      print NEWARTF $_;         
    }
  }
  close(NEWARTF);
  close(ARTFILE);
  if (! $justtest) {
    unlink $artfile;
    rename "${artfile}.new", $artfile;
  }
}

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

#!/usr/local/bin/perl5
# Createbatch, hand the existing article list to ao. innfeed.
# Crufted by Hans Lambermont newsmaster@philips.com

# cd /your_news_spool && find . -type f -print | createbatch.pl >
/tmp/list

&looparticles;

sub looparticles {
  while (<>) {
    chomp;
    if (/^.*\/\d*$/) {
      # only take number files
      $artfile = $_;
      &doarticle;
    } else {
      print STDERR "Ignore $_\n";
    }
  }
  exit 0;
}

sub doarticle {
  open(ARTFILE,"$artfile") || die "Cant open $artfile : $!";
  while (<ARTFILE>) {
    if (/^Message-ID:\s+(<.*>$)/) {
      $id=$1;
      last;
    }
  }
  close(ARTFILE);
  print "$artfile $id\n";
}

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

regards,
   Hans

-- 
Ir. Hans Lambermont          intranet url:http://garg.mpn.cp.philips.com
TIS/INS, Intranet Service Development   Hans.Lambermont@nl.origin-it.com
Origin IT Systems Management/NL bv    phone/fax: (+31 40 27) 85376/88729
PO Box 218, 5600MD Eindhoven, Netherlands VN507    GSM: (+31) 6 53252172

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