Question about file transfer methods using tar

Mark Waggoner waggoner at dtg.nsc.com
Sat Dec 8 11:52:00 AEST 1990


I have a script that transfers a file heirarchy from a disk on one machine
to a disk on another machine using this basic syntax:

cd $sourcedir; tar cvf - . | (cd  $destdir;  tar xfBp -)

The total quantity of the transfer is something like 10-100 Mbytes spread
across 50-1000 files of varying sizes.  The file systems are generally
hard NFS mounts.

The large quantity of data transfer sometimes causes NFS problems which
can range from simply a very slow transfer to completely locking up the
machine that is doing the transfer.

The first step of improvement is, obviously, to run the transfer on one of
the machines that actually has either the source or destination disks
attached to it.  This means you only make one network based transfer
rather than two.

My question is (yes, there finally is a question), would it be
adventageous to run the tar archive on the machine that owns the source
directory and the tar extract on the machine that owns the destination
directory?  

In other words, which of these is more efficient and/or robust?

Method 1, which makes the network crossing via the NFS file system mount.

rsh $sourcemachine "cd $sourcedir; tar cvf - . | (cd $destdir; tar xfBp -)"

or 
Method 2, which makes the network crossing via a pipe into a rsh.

rsh $sourcemachine \
"cd $sourcedir; tar cvf - . | (rsh $destmachine '"'cd $destdir; tar xfBp -'"')"

(I think I got the quotes right).

Thanks in advance,
Mark Waggoner  Santa Clara, CA    (408) 721-6306         waggoner at dtg.nsc.com 



More information about the Comp.sys.sun mailing list