Use dd command to backup whole disk to image file , acer desktop , win7 , pv(pipe viewer example)

Acer ASPIRE M1930 partition layout

Same PC but install windows7

 

-- OK! 在 virtualbox 測試
dd if=/dev/sda | pv | ssh -p 2200 [email protected] 'cat > winxp2.dd.img'
ssh -p 2200 [email protected] 'cat winxp2.dd.img' | pv | dd of=/dev/sda

-- OK! 把 Acer PC 整個硬碟備份到遠端 server 的 image file
dd if=/dev/sda | pv | ssh -p 2200 [email protected] 'cat > /mnt/m1/acer-pc-win7.dd.img'

-- OK!把 Acer PC 改裝 windows7 後, 備份到遠端 server
-- 用 pv 看進度 , pipe 給 gzip 壓縮後再透過 ssh 傳到遠端 server ,
dd if=/dev/sda | pv | gzip | ssh -p 2200 [email protected] 'cat > /mnt/m1/desktop-win7.dd.img.gz'

976773168+0 records in
976773168+0 records out
500107862016 bytes (500 GB, 466 GiB) copied, 12321.3 s, 40.6 MB/s

94G     desktop-win7.dd.img.gz