|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sending tar output to a remote host
Our group has recently inherited 15 servers that have not been maintained for over a year.
My first action is to backup the units however there is not enough disk space on most of them to run tar. My supervisor said to look at piping the tar output to another machine, however I have been unable to get this to work. I tried the command below tar -cv test.tar acc/ - | ssh user@sport:/home/user/temp/ but I get the error message Pseudo-terminal will not be allocated because stdin is not a terminal. I could use some help getting started on this since I dont know where to go from here. Links to appropriate reading would also be greatly appreciated. Thanks |
| Sponsored Links | ||
|
|
|
#2
|
||||
|
||||
|
You've almost got the command. You have forgotten to use tar on the other side of the ssh and the tar on the local server has some problems as well. Here you go: Code:
tar -cf - acc/ | ssh user@sport (cd /home/user/temp; tar -xf - ) You can stick a 'v' in the tar command if you want verbose output. |
|
#3
|
|||
|
|||
|
Quote:
tar -cf - acc/ | ssh user@sport (cd /home/user/temp ) Also, I've also come across the netcat command and it looks like it might work equally well. Is there any advantage to using either netcat or ssh? Thanks for the help. |
|
#4
|
||||
|
||||
|
Oh, OK. My mistake. I thought this was a simple transfer of files thing. Can you try this command instead? Code:
tar -cf - *|ssh -l remote_user remote_host cd /some/tmp/dir\; tar -xf -\;tar -cf /path/to/tape \* |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sending Commands to a Remote Host | safetytrick | UNIX for Dummies Questions & Answers | 3 | 08-18-2007 06:29 PM |
| How to delete the files from local host to remote host | krishna176 | Solaris | 3 | 03-24-2007 03:48 PM |
| tnsping at local and remote host? | milo | Shell Programming and Scripting | 1 | 03-16-2007 10:12 AM |
| How to specify the remote host? | redlotus72 | UNIX for Dummies Questions & Answers | 2 | 07-21-2005 05:21 AM |
| FTP - Connection Closed By Remote Host | mouglybean | IP Networking | 1 | 10-26-2004 09:15 AM |