[CentOS-virt] compress raw image

Ed Heron

Ed at Heron-ent.com
Thu Aug 4 17:38:12 UTC 2011

On Thu, 2011-08-04 at 16:35 +0200, Rainer Traut wrote:
> Hi,
> I need to transfer a local raw image to another datacenter.
> Is there a way to achieve good compression of this image, I heard of 
> tools overwriting unused space with zeros. Is this a good idea?
> It's an W2k8 image/NTFS.
> Thx
> Rainer

  I'd use
dd if=<local dev> | bzip2 | ssh <remote user>@<remote server> "bunzip2 |
dd of=<remote dev>"
or something similar.

  I'd then do
ssh <remote user>@<remote server> "md5sum <remote dev>" ; md5sum <local
to give myself some reassurance that they were the same.


More information about the CentOS-virt mailing list