Date: Tue, 04 Nov 1997 21:40:19 +0000 From: "Julian H. Stacey" <jhs@freebsd.org> To: "John Brown" <jbrown@vafibre.com> Cc: freebsd-current@freebsd.org Subject: Re: rdist Alternatives Message-ID: <199711042140.WAA07484@flip.jhs.no_domain> In-Reply-To: Your message of "Tue, 04 Nov 1997 12:27:12 EST." <01bce946$e33539b0$65df8bcd@is01.vafibre.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Reference: > From: "John Brown" <jbrown@vafibre.com> > Date: Tue, 4 Nov 1997 12:27:12 -0500 > Message-id: <01bce946$e33539b0$65df8bcd@is01.vafibre.com> Hi, "John Brown" wrote: > I have been working for a couple of weeks now to get rdist to work and have > been very unsuccessful. > > So now on to the next option. I need to duplicate my password db to my > secondary radius server. Are there other utilities that I can use to make > this happen? ports/net/ contains mirror I suppose (I dont use mirror tho') > rdist info -- In case someone is interested. I started with a 2.1.x box and > was able to get it to transfer files from this machine to a 2.2.2 box but > could never get it going the other way. So being the smart individual that I > am I upgrade the 2.1.x box to 2.2.5 now -- well you guessed it...Now it > doesn't work either way. When running with the debug flag it appears to bomb > at the first rsh that is executed with a 'permission denied' at this point I > have checked everything that I can think of and am at a loss. rlogin will > work both way's but rsh and rcp AND rdist will not. (all die with the same > message 'Permission Denied'). Nothing in the messages log, NOTHING > AAAAAARRRRRRRGGGGGHHHH!!! I append http://www.freebsd.org/~jhs/src/bsd/fixes/FreeBSD\ /src/gen/usr.bin/rdist/rdist.1.diff dated Mar 31 1997 ... looks like I haven't submitted it via send-pr yet [blush, doing that right now] ... --------- Extension of manual *** old/src/usr.bin/rdist/rdist.1.~1~ Tue Jan 21 19:07:53 1997 --- old/src/usr.bin/rdist/rdist.1 Mon Mar 31 14:07:57 1997 *************** *** 400,409 **** .Sh DIAGNOSTICS A complaint about mismatch of rdist version numbers may really stem from some problem with starting your shell, e.g., you are in too many groups. .Sh BUGS Source files must reside on the local host where .Nm rdist ! is executed. .Pp There is no easy way to have a special command executed after all files in a directory have been updated. --- 400,436 ---- .Sh DIAGNOSTICS A complaint about mismatch of rdist version numbers may really stem from some problem with starting your shell, e.g., you are in too many groups. + .Pp + .Nm Rdist + relies on + .Nm rsh(1) + type remote services executing succesfully & in silence. + If you try something like + .Bd -literal -offset indent + rsh freefall.freebsd.org hostname + .Ed + .sp + & get extra output before the program ( + .Nm hostname(1) + ) output, such as + .Bd -literal -offset indent + Text_perhaps_initiated_from_~/.cshrc_or_similar + freefall.freebsd.org + .Ed + .sp + then the unexpected extra text will cause + .Nm rdist + to fail with the error message: + .Bd -literal -offset indent + rdist: connection failed: version numbers don't match + .Ed + .sp .Sh BUGS Source files must reside on the local host where .Nm rdist ! is executed ! (Note, a ~/public_html that is a symbolic link via NFS to another local host is not ! considered local by rdist, so rdist will not copy it to the remote rdist destination). .Pp There is no easy way to have a special command executed after all files in a directory have been updated. --------- Your problem sounds familiar, I too once had trouble with rdist, but it's been working fine for ages here now though, turned out it was some dot file (or /etc/profile whatever :-) was generating start up noise, & confusing the handshake, tried moving all your (& system etc) dot files aside yet ? I suggest first concentrate on getting a simple rsh to work, if that won't, rdist won't either, I regularly use rdist between my 2.2.2 systems (well, one sys has some kind of stable kernel, but the rest of the systems are 2.2.2 for now) FYI this is my ~/Distfile # desk:~jhs/Distfile # Usage: cd / ; rdist -f ~jhs/Distfile HOSTS = ( desk ) FILES = ( etc ~ ) # The secret /etc files dont get copied ${FILES} -> ${HOSTS} install -R /usr/backup/wall ; & this is the shell I use from crontab & manually: #!/bin/sh # backup.net daily net backup. jhs@freebsd.org hostname=`hostname -s` owner=`whoami` shell_name=`basename $0` log_file=.$shell_name.log day=`date +%Y_%m_%d` case $hostname in # 'flip') # local_src=/usr/p/$owner # remote_host=desk # remote_target=/usr/backup # tmp_dir=/usr/tmp # (cd / ; rdist -f $local_src/Distfile ) ; exit # exit # ;; 'desk') local_src=/usr/p/$owner remote_host=wall remote_target=/usr/backup tmp_dir=/usr/tmp (cd / ; rdist -f $local_src/Distfile ) ; exit exit ;; 'skier') local_src=/usr/p/$owner remote_host=desk remote_target=/usr2/data/backup.net/$owner tmp_dir=/usr/tmp ;; default) echo "hostname not recognised" exit 1 ;; esac todays_log=$tmp_dir/$shell_name.$owner.log tmp_file=$tmp_dir/.$shell_name.$owner.tmp todays_log=$tmp_dir/.backup.$owner.msg.tmp cumulative_log=$local_src/$log_file chat="Started $shell_name $day { `date`" echo "$chat" > $todays_log echo "" >> $cumulative_log ; echo "$chat" >> $cumulative_log # rcp converts sym links to directories, so cant be used. cd $local_src nice tar zcf $tmp_dir/$shell_name.$day.tar.gz . ; \ nice rcp -p $tmp_dir/$shell_name.$day.tar.gz \ $remote_host:$remote_target/$shell_name.$day.tar.gz \ | /bin/sh 2>&1 | cat > $tmp_file rm $tmp_dir/$shell_name.$day.tar.gz cat $tmp_file >> $todays_log cat $tmp_file >> $cumulative_log if [ $local_src_2.x != .x ] then cd $local_src_2 nice tar zcf $tmp_dir/$shell_name.$day.tar.gz . ; \ nice rcp -p $tmp_dir/$shell_name.$day.tar.gz \ $remote_host:$remote_target_2/$shell_name.$day.2.tar.gz \ | /bin/sh 2>&1 | cat >> $tmp_file fi rm $tmp_dir/$shell_name.$day.tar.gz cat $tmp_file >> $todays_log cat $tmp_file >> $cumulative_log chat="Finished } Network Backup `date`" echo "$chat" >> $cumulative_log echo "$chat" >> $todays_log mail -s "Cron: backup.net: Net Backup $0" $owner < $todays_log rm $tmp_file $todays_log Good Luck. Julian -- Julian H. Stacey jhs@freebsd.org http://www.freebsd.org/~jhs/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711042140.WAA07484>