Tip: save and compress at the same time with dd and gzip

An interesting tip I've found:

To save and compress, the command is as follows (replace xxx with the ID of your disc):



dd if=/dev/xxx conv=sync,noerror bs=4m | gzip -c > xxx.img.gz

To decompress and restore, the command is as follows (replace xxx with the ID of your disc):



gunzip -c xxx.img.gz | dd of=/dev/xxx conv=sync,noerror bs=4m 

For other operating system than OSX, use capital M.

Source: pihomeserver.wordpress.com


We request your permission to obtain statistical data on its navigation on this website. If you continue to browse we consider to accept the use of cookies. OK | More Information