Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] problems piping to gunzip

$
0
0
Hi All,

I am running the following command to create a disk image of a server I want to virtualise. The command works fine but gives me a compressed image on the far side. I am trying to work out how to pipe things so that the output from ssh get's gunziped before being passed to dd.

The command is;

dd if=/dev/sda | gzip -1 - | ssh garethw@10.0.8.10 dd of=/home/garethw/image_sda.img

I know I can just gunzip at the remote end once the transfer is complete but I would prefer to do it in 1 hit if it's possible.

I've tried various combinations of adding

gunzip - |
gzip -d |
cat | gzip -d |
cat | gzip - |

after the IP and before the dd command but have not managed to get anything working.

Anyone have any ideas?

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>