If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Need help with tar-ing files to another machine

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-16-03, 18:10
mjorg mjorg is offline
Registered User
 
Join Date: Apr 2003
Posts: 8
Need help with tar-ing files to another machine

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
Reply With Quote
  #2 (permalink)  
Old 06-16-03, 18:18
LKBrwn_DBA LKBrwn_DBA is offline
Registered User
 
Join Date: Jun 2003
Location: West Palm Beach, FL
Posts: 2,456
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).
Reply With Quote
  #3 (permalink)  
Old 06-16-03, 18:22
mjorg mjorg is offline
Registered User
 
Join Date: Apr 2003
Posts: 8
Found out how to do it

#!/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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On