The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cut command on a remote machine using rsh eamani_sun Shell Programming and Scripting 1 06-04-2008 09:33 PM
executng program on remote machine using ssh sewood Shell Programming and Scripting 1 02-17-2008 07:03 PM
Help regarding theMailing of output from a remote machine OSD UNIX for Advanced & Expert Users 1 08-21-2007 01:00 PM
how to execute a script on remote machine balireddy_77 Shell Programming and Scripting 4 09-27-2006 07:45 PM
Searching for files in Remote Machine matrixmadhan UNIX for Dummies Questions & Answers 0 06-21-2005 05:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-02-2006
hshapiro hshapiro is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 56
Tar to remote machine

Is there a way to use Tar (not GNU) to automaticallly create a tar file on a remote machine. the source files will be local, but I would like tthe tar file to be remote.

Thanks.
  #2 (permalink)  
Old 08-02-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,929
tar doesn't support this directly, and neither would any sane archiver. Your question boils down to "how do I send files to another machine?"

A couple options:
  • tar the files, then ftp the tar file onto the other machine.
  • Mount a directory on the target machine onto your own using something like nfs or samba, then create the archive in that.
  • Stream the file over a network socket somehow, so that it never needs to exist locally. I built a hack to do this once, and don't reccomend it's use, but it shows how to use tar as a stream.
  #3 (permalink)  
Old 01-23-2009
jvpiel jvpiel is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 1
$ tar --rsh-command=`which ssh` -zcvf remote_host:filename.tar.gz -- directory_to_tar

Single line solution, not a hack, part of tar. Works even if you don't have enough space to create the archive on the local machine. use -jcvf and filename.tar.bz2 if you want a little better compression. Data is sent securely over the wire, assuming you have SSH setup correctly.

man tar is your friend. Boosh!

Last edited by jvpiel; 01-23-2009 at 07:20 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:22 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0