On Wed, Sep 04, 2002 at 10:07:41PM -0500, Jim Streit wrote:
>Do you guys know if there is a way to update a file on a remote linux
>box without and NFS mount or anything like that?
yes
>
>What I want to do is have a script running on server A that appends data
>to to a file on server A and appends data to server B, and server C.
ok
>
>I was thinking that I could have the script do an rsync and pull the
>latest version of the remote file, append the data, then rsync and push
>the file back out with the update option.  Sounds like a lot of hassel and
>I'm looking for a better way.
rsync is a VERY good choice
>
>I wish I cou do something something like this ... (ignore the syntax just
>trying to make an example)
>
>On local machine I would;
>  cat newdata >> maindatafile
>  or
>  echo "This is the new data" >> maindatafile
>
>and something like this for the remote machine;
>  cat newdata >> remote_machine:/file/location/maindatafile
>  or
>  echo "This is the new data" >>remote_machine:/file/location/maindatafile
>
>Any thoughts?
yes
scp and rsync sound like what you may want.
if you truly want to cat file.foo >>
remotehost:~/path/to/file.foo.master 
scp might be something to consider.  You can tell scp to exec whatever
task you want upon authentication.  Just send cat to a | (pipe) and you
should be on track. <scp details left out for lack of experimentation>
As far as updating files and directories remotely, rsync just rocks!!
you can use ssh as the conduit to move the files with something as
simple as :
rsync -auve ssh /path/to/backup/ user at host.foo/path/to/master/
one gotcha is the trailing /'s!!! be careful with the trailing slashes.
read the documentation for details.
if you set up public key host authentication you can put that in  your
crontab and it will just happen.
>Thanks
>
>Jim Streit
>
>
>
>
>_______________________________________________
>Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
>http://www.mn-linux.org
>tclug-list at mn-linux.org
>https://mailman.mn-linux.org/mailman/listinfo/tclug-list

-- 
                	--*--SpencerUnderground--*--
http://autonomous.tv/			       spencer at autonomous.tv
Key fingerprint = 173B 8760 E59F DBF8 6FD2  68F8 ABA2 AB08 49C7 4754

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20020905/f451e51c/attachment.pgp