[CentOS] dd trough scp with tar

Fri Apr 25 20:59:07 UTC 2008
Ray Van Dolson <rayvd at bludgeon.org>

On Fri, Apr 25, 2008 at 10:48:17PM +0200, David Hláčik wrote:
> Hi,
> first i will explain my experiment :
> We have ESX server running virtual machines .We want to migrate to XEN. As i
> did not found any tool for transfering ESX to for example real server, or
> better to XEN --> please correct me if i am wrong , i found following approach
> :
> i will inside virtual machine on ESX boot from Live-CD of CentOS , using dd i
> will transfer images trought scp to CentOs machine with xen. I believe this one
> should work, machines on ESX are Windows2003 Servers.
> So what i need to find is how to write a command which will transfer image
> trought scp , but for faster transfer also compress  it before using tar, or
> gzip.
> so my input will be dd if=/dev/sda1 , my output will be gzipped or tarred image
> on second side. sda1.img.gz

dd if=/dev/sda1 | gzip -c | ssh host "cat > output.gz"

Sanity check on that?

If you're not worried about security of this transfer, might be faster
to use NFS or something.