[comp.protocols.tcp-ip.ibmpc] FTP transfer of tree structures

SCEF0003@WSUVM1.CSC.WSU.EDU ("James N. Petersen") (01/30/91)

Is there any way to have FTP transfer a tree structure and still retain
the tree structure on the receiving end.  In essence, I would like to
perform a recursive transfer.  I know that the FTP included with
the Execelan boards will perform such a transfer, but I believe it is
an extension that they built in.  In particular, I am interested in
NCSA FTP or the FTP that come with CUTCP.

Thanks.

jbvb@FTP.COM ("James B. Van Bokkelen") (01/31/91)

    Is there any way to have FTP transfer a tree structure and still retain
    the tree structure on the receiving end.  

You can only reliably do this between systems with similar directory
structures.  You can implement a 4bsd Unix compatible RCP or RTAR for
the PC, but that depends on the similarity between the PC and Unix
filesystems.  It would be much harder to do against VMS, for instance.
I've seen the FTP client you mention, and I've seen problems caused by
it with non-Unix servers....

James B. VanBokkelen		26 Princess St., Wakefield, MA  01880
FTP Software Inc.		voice: (617) 246-0900  fax: (617) 246-0901

crampton@hpldsla.sid.hp.com (David Crampton) (02/01/91)

A year ago I blew 2 months learning FTP for a project requiring recursive
transfer; then gave up. FTP is designed to be user-interactive and provided
(then at least) no correct automatic interpretation of the wildcard. I
developed the project with rcp -r instead. That has worked well despite
the alleged poor transfer reliability of rcp. I've kept quiet about using
it so the security priests haven't gotten to me about the .rhosts file
concerns.

Since then HP Analytical group has worked with FTP to write a shell 
around ftp to allow recursive transfers with either Windows i/f or
command line. This was developed for the HP Analytical (as in chemistry)
workstations; I don't know about how generalized it may be. I am planning
to learn more about it as a possible alternative to my present process.
I'm no salesperson but would still encourage you to enquire about
HP Chemlan product. At least don't hack at ftp!

p.s. Others of my critics claim that a safe and reliable way is to
tar the dir structure; ftp the tar file; requires tar -x at receiving
end. I've done this manually occasionally; never automated it. Cheers.
--------------------------------
David Crampton
Hewlett-Packard Scientific Instruments Div Palo Alto CA
Software Mfg Engineering

dbrown@apple.com (David Brown) (02/01/91)

In article <9101291607.aa05830@louie.udel.edu> SCEF0003@WSUVM1.CSC.WSU.EDU 
("James N. Petersen") writes:
> Is there any way to have FTP transfer a tree structure and still retain
> the tree structure on the receiving end.

Two methods come to mind, neither of which is automatic or foolproof.

1) If you have enough disk space and compatible archiving utilities on 
both machines (e.g. tar, cpio, arc, stuffit, etc) create an archive, 
transfer (be sure to specify binary transfer), and unarchive.  Be careful 
about line feed translations, etc.  If you don't have enough disk space 
but do have some sort of remote execution facility (like rsh or rexec), 
you may be able to pipe the output of the "create archive" to the remote 
execution of the "extract archive" running on the remote machine.

2) Use find or equivalent command (e.g. from the MKS Toolkit) to create a 
list of directories in the tree; use sed or manually edit to make this 
into a batch file of mkdir's; use find again to create a list of files to 
transfer and transform this into a list of files to transfer which can be 
fed to ftp.

David Brown    415-649-4000
Orion Network Systems
 (a subsidiary of Apple Computer)
1995 University Ave
Suite 350
Berkeley CA 94704

jbvb@FTP.COM ("James B. Van Bokkelen") (02/04/91)

    p.s. Others of my critics claim that a safe and reliable way is to
    tar the dir structure; ftp the tar file; requires tar -x at receiving
    end. I've done this manually occasionally; never automated it. Cheers.

This requires scratch space.  Our PC/TCP and Sun's PC-NFS "Lifeline" add-on
both implement networked 'tar', if you have a 4bsd server that includes
'rmt' and 'rsh' or 'rexec' support.  Note also that 'rcp' could be made more
secure, if someone wrote a client that would fall back on 'rexec' and ask
for a password if the authentication for 'rsh' failed.  I'll hassle my
developers...

James B. VanBokkelen		26 Princess St., Wakefield, MA  01880
FTP Software Inc.		voice: (617) 246-0900  fax: (617) 246-0901