tptass has asked for the wisdom of the Perl Monks concerning the following question:
I am looking to transfer large amount of data through a socket from one machine to another. Usually I would just use scp or ssh, but this needs to all be done automatically, and setting up ssh keys cannot be done. I am trying to find a good way to do something link the following:
tar czf - <directory> | ssh <username>@<hostname> tar xzf -Currently I am using sysread and syswrite to read and write to the socket and can transfer a single file at a time. However, I have directories that are 6 - 10 GB in size, so I was trying to reduce the transfer cost by tarring the directory to be sent. I could tar the directory prior to sending, but that seems foolish and I may run out of space on some machines if I do that. Is there a way to pipe tar into a socket, rather than to ssh? If so, can you please provide a small snippet. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl - Socket and Data Compression
by rcaputo (Chaplain) on Jul 17, 2009 at 22:24 UTC | |
|
Re: Perl - Socket and Data Compression
by jethro (Monsignor) on Jul 17, 2009 at 22:59 UTC | |
|
Re: Perl - Socket and Data Compression
by Marshall (Canon) on Jul 18, 2009 at 00:01 UTC | |
by pileofrogs (Priest) on Jul 18, 2009 at 04:38 UTC | |
by Marshall (Canon) on Jul 18, 2009 at 05:35 UTC | |
by pileofrogs (Priest) on Jul 18, 2009 at 15:15 UTC | |
by Marshall (Canon) on Jul 21, 2009 at 23:34 UTC | |
| |
|
Re: Perl - Socket and Data Compression
by tptass (Sexton) on Jul 18, 2009 at 13:53 UTC | |
by rcaputo (Chaplain) on Jul 21, 2009 at 23:35 UTC | |
|
GNU tar has remote option
by unixtechie (Initiate) on Jul 20, 2009 at 10:21 UTC |