Gentoo Archives: gentoo-user

From: Tom Smith <tom71713-gentoo52478932@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] tar over ssh
Date: Wed, 25 Jan 2006 04:51:41
Message-Id: 43D702BF.7050603@yahoo.com
In Reply to: Re: [gentoo-user] tar over ssh by John Jolet
1 John Jolet wrote:
2
3 >
4 > On Jan 24, 2006, at 9:10 PM, Ow Mun Heng wrote:
5 >
6 >> On Tue, 2006-01-24 at 17:23 +0000, Francesco Riosa wrote:
7 >>
8 >>> Jeff wrote:
9 >>>
10 >>>> Hey guys.
11 >>>>
12 >>>> I've got this big fat backup server with no space left on the hard
13 >>>> drive
14 >>>> to store a tar file. I'd like to pipe a tar through ssh, but not sure
15 >>>> what the command would be. Something to the effect of:
16 >>>>
17 >>>> # cat /var/backup | ssh backup.homelan.com 'tar data.info.gz'
18 >>>>
19 >>>> So that, the data is actually being sent over ssh, and then
20 >>>> archived on
21 >>>> the destination machine.
22 >>>>
23 >>> tar -zcf - /var/backup | ssh backup.homelan.com "( cat >
24 >>> data.info.gz )"
25 >>>
26 >>
27 >> There's another way. This assumes your originating server's CPU is
28 >> slow/precious and you have a 16 way node on a backup server (HAHA!!)
29 >>
30 >> tar cf - /var/backup | ssh backup.homelan.com "gzip -c >
31 >> filename.tar.gz"
32 >>
33 >> But you transfer the stream uncompressed, so more bits get transferred.
34 >>
35 > you're kidding, right? Unless you've got a PII on the originating
36 > end and are using gigabit ethernet between the two nodes, compressing
37 > the data before transmission will almost always be faster. I tested
38 > this scenerio extensively about 3 years ago, using linux, aix, and
39 > solaris hosts. In no case was transferring uncompressed data faster
40 > than compressing (at least to some degree) the data on the
41 > originating server. And frankly, no matter what you do...wouldn't
42 > you hope ALL the bits get transferred? :)
43
44 I read something some time ago that suggested if you transfer a
45 compressed file over a compressed SFTP connection, for example, that it
46 would take longer to transfer the data versus if only the data or the
47 connection was compressed. The reason, as I recall, had to do with
48 compressing already compressed data--this apparently created some
49 overhead on the connection.
50
51 Did you look at this situation in your tests? If so, what were the results?
52 --
53 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] tar over ssh Uwe Thiem <uwix@××××.na>
Re: [gentoo-user] tar over ssh John Jolet <john@×××××.net>