Incremental Sync between Inn Servers

Julien ÉLIE julien at trigofacile.com
Fri Oct 9 16:41:21 UTC 2009


Hi Zhenyu,

>>> Is there any method can synchronize articles between two NNTP servers incrementally?
>>
>> What do you want exactly?
>> (Slave mode for the second news server? -- see xrefslave in inn.conf)
>
> Two inn servers synchronize each other.
> 1. INN server 1 and INN server 2 be setup.
> 2. INN server 1 be used in intranet(Read/Post)
> 3. INN server 2 be used in internet(Read/Post)
> 4. Two server synchronize news feed at certain time
> 5. Just synchronize new posted articles. such as articles posted after last synchronization.

Why not use UUCP?

For instance, I generate news batches towards news.litech.org with these
lines in newsfeeds:

news.litech.org/news.litech.org\
        :!*,news.software.nntp\
        :Tf,Wnb,B4096/1024:


and these lines in send-uucp.cf:

news.litech.org   bzip2      1048576   0,5,10,15,20
news.litech.org   compress   1048576   1,6,11,16,21
news.litech.org   gzip       1048576   2,7,12,17,22
news.litech.org   gzip_-5    1048576   3,8,13,18,23
news.litech.org   none       1048576   4,9,14,19

(Yes, you can use only one line with your preferred method!)



/etc/uucp/call:

news.litech.org login    password

(Use tabs.)


/etc/uucp/config:

nodename        news.trigofacile.com


/etc/uucp/passwd:

login2 password2


/etc/uucp/Poll:

poll news.litech.org 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23


/etc/uucp/port:

port ssh
type pipe
command /usr/bin/ssh -a -x -q -i /var/spool/uucp/.ssh/id_rsa_litech -l uucp news.litech.org
reliable true
protocol etyig



/etc/uucp/sys:

protocol gvG
protocol-parameter G packet-size 1024
protocol-parameter G short-packets

system news.litech.org
call-login *
call-password *
commands /home/news/bin/rnews
time any
chat "" \d\d\r\c ogin: \d\L word: \P
chat-timeout 30
protocol i
port ssh




/etc/cron.d/inn2:

52 *    * * *   news    send-uucp

/etc/cron.d/uucp:

8 * * * *      uucp    [ -x /usr/lib/uucp/uudemon.hr ] && /usr/lib/uucp/uudemon.hr



=> I generate a UUCP file every hour, at minute 52.
=> I send the UUCP file every hour, at minute 8.
(=> I also receive something from news.litech.org when it connects at minute 38.)




>> You could also run nnrpd on port 80...
>
> Got it. Thanks.  I rebuild inn by following steps
> 1. add --with-innd-port=80 when running configure
> 2. add "-D -p 80" as value of "nnrpdflag" in inn.conf
> 3. start inn   ./rc.news
> Although it seem work, I'd like to confirm with you guys again, is there any missing?

Hmm...  Why "-D" in nnrpdflags?  It should not be given here...
nnrpd is not running in daemon mode when spawned by innd.

Either you want to run innd on port 80 (port: 80 in inn.conf) and, if needed,
it will spawn nnrpd on the same connection.
Or you want to run innd on port 119 and nnrpd on port 80 in daemon mode.  Then
I would use /etc/init.d/inn2 with:

start () {
    su news -c /home/news/bin/rc.news
    su news -c '/home/news/bin/nnrpd -D -p 80'
}

stop () {
    # A nice way to stop nnrpd processes:
    # start-stop-daemon --stop --name nnrpd --quiet --oknodo
    # But well... :)
    su news -c 'killall nnrpd'
    su news -c '/home/news/bin/rc.news stop'
}


I hope it will be of help.
Regards,

-- 
Julien ÉLIE

« Il buvait toutes mes paroles, et comme je parlais beaucoup,
  à un moment, je le vois qui titubait... » (Raymond Devos) 




More information about the inn-workers mailing list