PDA

View Full Version : Need help with tar-ing files to another machine


mjorg
06-16-03, 19:10
I would like to tar a directory and all it files to another machine on our network. Here is the script I'm trying to create but get the following error:

colt 18% t1
test start
tar: invalid blocksize.
done test

#!/bin/sh
echo "test start"
tar cbf- temp \ rsh mmlsg1 dd "(cd /anaylsis/ICO && tar xbpf-)"
echo "done test"


temp is the directory on the machine called Colt
Want to copy or move the directory to the machine mmlsg1 to the following directory structure:
/anaylsis/ICO

Thanks in advance for your help.

Marty

LKBrwn_DBA
06-16-03, 19:18
Try this:

#!/bin/sh
echo "test start"
tar cbf - temp |compress -c|rsh mmlsg1 dd of=/anaylsis/ICO/MyFile.tar.Z
echo "done test"

Note: tar creates a file, therefore the target must be a file name on the other machine. (and compressing save space and transmission time).

mjorg
06-16-03, 19:22
#!/bin/sh
echo "test"
tar cvfb - 20 temp | rsh mmlsg1 '(cd /analysis/ICO/ ; tar xvfBbp - 20)'
echo "done test

Did a search for remote machine copy and came up with this link
http://ccd.ifa.hawaii.edu/~jim/kjtar.php3#1.6

Marty