Tuesday, April 4, 2017

Restore a dd.gz image file to a physical disk

Assuming you're using the original size/type of disk that you created the image from in the first place, and you already know the block size, here is the command (modify to your needs):

# unpigz myDiskImage.dd.gz | dd bs=512k of=/dev/sdi


To know the progress of the restoration, us pipe viewer like below:

# pv myDiskImage.dd.gz | unpigz | dd bs=512k of=/dev/sdd