Page 1 of 1

dd / ddrescue Question

Posted: 29 Dec 2013, 04:35
by Ryon
I would like to backup/clone/copy a failed partition to a file under Linux, and be able to reverse the process if needed. Reading the ddrescue documentation, it seems that partitions can only be copied to other partitions, and the dd documentation is ambiguous on this as well. Will this create a good backup of a my partition to a file?

>dd bs=512K if=/dev/sda /home/me/bup.dd conv=noerror

or this?

>dd bs=512K if=/dev/sda2 /home/me/bup.dd conv=noerror

Also, will it do any damage if I get the block size wrong? Thanks!

Re: dd / ddrescue Question

Posted: 31 Dec 2013, 19:36
by Ryon
I think I have the answer from the Arch linux wiki:

Code: Select all

 # dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c  > /mnt/sda1/hda.img.gz
and to restore,

Code: Select all

 # fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info
Basic stuff. It allows us to backup to a normal zipped file instead of buying another hard disk to clone to directly.

EDIT: Cut and pasted the wrong line! That second should be

Code: Select all

# gunzip -c /mnt/sda1/hda.img.gz | dd of=/dev/hda