1 |
On Tue, 2006-01-24 at 17:23 +0000, Francesco Riosa wrote: |
2 |
> Jeff wrote: |
3 |
> > Hey guys. |
4 |
> > |
5 |
> > I've got this big fat backup server with no space left on the hard drive |
6 |
> > to store a tar file. I'd like to pipe a tar through ssh, but not sure |
7 |
> > what the command would be. Something to the effect of: |
8 |
> > |
9 |
> > # cat /var/backup | ssh backup.homelan.com 'tar data.info.gz' |
10 |
> > |
11 |
> > So that, the data is actually being sent over ssh, and then archived on |
12 |
> > the destination machine. |
13 |
> > |
14 |
> tar -zcf - /var/backup | ssh backup.homelan.com "( cat > data.info.gz )" |
15 |
> |
16 |
|
17 |
There's another way. This assumes your originating server's CPU is |
18 |
slow/precious and you have a 16 way node on a backup server (HAHA!!) |
19 |
|
20 |
tar cf - /var/backup | ssh backup.homelan.com "gzip -c > |
21 |
filename.tar.gz" |
22 |
|
23 |
But you transfer the stream uncompressed, so more bits get transferred. |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
-- |
29 |
Ow Mun Heng |
30 |
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM |
31 |
98% Microsoft(tm) Free!! |
32 |
Neuromancer 11:10:24 up 11:00, 6 users, load average: 1.08, 1.04, 1.15 |
33 |
|
34 |
|
35 |
-- |
36 |
gentoo-user@g.o mailing list |