[lug] dd ssh pipe to bzip?

Orion Poplawski orion at cora.nwra.com
Wed Nov 17 14:07:42 MST 2010


On 11/17/2010 02:04 PM, Paul Nowosielski wrote:
> Hi!
>
> Can someone give me a little advice
> on how to do this.
>
> I'm running dd via ssh pipe and then I would like to
> compress the output. I'm not sure how to do it so the
> receiving server compresses it.
>
> # this is what I have so far
> dd if=/dev/mapper/VolGroup00-LogVol00 | ssh offsite at dev -i
> /root/.ssh/id_dsa_offsite "dd of=gw2.iso"
>
>
> # I tried this and a few variations but it didn't work
>   dd if=/dev/mapper/VolGroup00-LogVol00 | ssh offsite at dev -i
> /root/.ssh/id_dsa_offsite "dd of=gw2.iso | cat |bzip2 "

dd of=file means output to the named file, so there is nothing left to compress.

How about:

dd if=/dev/mapper/VolGroup00-LogVol00 | ssh offsite at dev -i
  /root/.ssh/id_dsa_offsite "bzip2 -c > gw2.iso.bz2"



-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com



More information about the LUG mailing list