I am booting a live disk Ubuntu and I want to back up my entire SSD (sdb) with all 3 partitions (sdb1, sdb2, sdb3) to an image file on an external hard disk.
This guide suggests this command:
dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c > /path/to/backup.img.gz
I want to use the image to later on convert it with
qemutoVHDorVMDKand boot the Ubuntu system on a virtual machine so I'm not sure about the.gzcompression there.What is the format of the
.imgfile that the command is creating? Is it.iso?Why does the command have
conv? I don't want any conversion, I want raw clone to image.I also noticed the
ddcommand doesn't even have anof=part.Does
bs=128kimprove speed thanbs=64k?
So from what I know I think the correct command for my needs is:
dd if=/dev/sdb bs=64k of=/dev/sdd1/image.img
note: sdd1 is the only partition of my external hard disk.
dd if=/dev/sda of=/dev/zerosounds a bit dangerous... – mook765 Jul 22 '18 at 20:12/dev/sdaand writes to/dev/zero. – vidarlo Jul 22 '18 at 20:23NUMBEROFBYTESmeansThe size of the image file, in bytes, provided through stdin.but I don't understand, my drive is 250 GB and the size of the.vdifile should be whatever the stdin sends at the end, so what am I going to specify here? – Shayan Jul 24 '18 at 16:24sudoto both sides of the command to make it work, so it should look like this for my 250 GB drive:sudo cat /dev/sda | sudo VBoxManage convertfromraw stdin OutPutFile.vdi 250059350016– Shayan Jul 24 '18 at 19:50