Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Bob Harris <harris@zk3.dec.com>
To: "Mark M." <anonymous@direct.ca>
Subject: Re: FTP and RCP severe limitations?
Date: 2000/02/26	[thread overview]
Message-ID: <260220001213412409%harris@zk3.dec.com> (raw)
In-Reply-To: Q7Qt4.13919$mK.1052551@brie.direct.ca

[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <Q7Qt4.13919$mK.1052551@brie.direct.ca>, Mark M.
<anonymous@direct.ca> wrote:

XI work once in a while on two DEC Alphastation 166's with OSF/1, (version is
Xabout 2 yrs old). Each system is identical (like two engines on a plane, to
Xkeep it flying in all conditions) because we run a mission-critical Process
XControl system on it that operates heavy equipment at a shipping site.
X
XHere's the problem: Every hour of every day a 250k file is created
Xcontaining history for the hour (24 files per day). We have about 50,000
Xfiles now and it continues to grow on each machine at 24 files per day in a
Xsingle directory. When I use "ftp -i" or even "rcp"  to copy files from one
Xmachine to the other it only permits me to copy about 250 to 300 files at a
Xtime, (I use a wildcard when transferring). If my wildcard is going to
Xaccess more than this number of files I get some sort of error saying that
X"it's too much to do at once".
X
XI must copy history periodically between machines because sometimes one
Xmachine goes down, and therefore gets a "history hole" that has to be filled
Xwith files from the other machine. Another reason for copying large numbers
Xof files is when I want to copy a directory within a single machine, and in
Xthis case, the same problem occurs.
X
XIs there a setting I can change on the system so that I can copy as many
Xfiles as I want? This seems like a ridiculous limitation we are living with.
XTo compensate for this limitation I have been saving massive directories
Xwith TAR, then restoring the directories all at once to the second machine,
X(but this is also slow since the machines are about a kilometre apart,
Xconnected by fibre).

This is a "Kludge" but can you use 'rsh' to either start a script
running on the remote system or to pass commands over to the remove
system to be run.

If you can, then may be you could use 'find' to collect the names of
the files to transfer and then have the remote system push them over to
you via 'rcp' or an 'ftp' utility running in a script.

Or use 'rsh' to run 'find' on the remote system and return the list of
files to the local system where you can run 'rcp' using the list of
files returned.

this is just psuedo shell code which I have not debugged nor I have I
run it.  It is just to give an idea of what I mean.

#!/bin/ksh
rsh -l username remote_host find /directory_of_histories -print | \
while read file
do
    rcp remote_host:$file local_destination
done
exit

In this case the 'find' command is shipped to the remote system, but
its output is passed back to the local system where it is piped into a
shell script 'while' command that reads each filename into the variable
'file'.  The 'while' loop then executes an 'rcp' command for each file
to be copied.

You could just as easily pass over all the commands to be executed on
the remote, or you could copy over a script to find the files and have
the remote system copy them over to your local system.

You could also pass over the 'ls -1' command to get a list of files in
the directory.

Your 'while' loop can do some filtering based on the names if that is
desired.  The 'find' command can do various selection services such as
only selecting files that less than a day old 

        find /dir -mtime -3 -print

I hope this helps.



  parent reply	other threads:[~2000-02-26  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-26  5:00 FTP and RCP severe limitations? Mark M.
2000-02-26  5:00 ` Adam Price
     [not found]   ` <shu2iuh8v5.fsf@lns130.lns.cornell.edu>
2000-02-27  5:00     ` Adam Price
2000-02-28  5:00   ` Mark M.
2000-02-28  5:00     ` Daniel S. Riley
2000-02-28  5:00     ` Jack Patteeuw
2000-02-26  5:00 ` Bob Harris [this message]
2000-02-29  5:00 ` Joerg Bruehe
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox