[CentOS-virt] compress raw image

Thu Aug 4 20:59:24 UTC 2011
Izaac <izaac at setec.org>

On Thu, Aug 04, 2011 at 04:35:20PM +0200, Rainer Traut wrote:
> 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?

You're talking about sparse files?  You probably want to use rsync with
--sparse to keep the file from inflating on the far side.  Something
like:

   rsync -ctrvlzSP source.raw user at destination:source.raw

-- 
. ___ ___  .   .  ___
.  \    /  |\  |\ \
.  _\_ /__ |-\ |-\ \__