dd if=/backup/disk.img of=/dev/sda bs=4M status=progress

Category: Backup & Restore

dd if=/backup/disk.img of=/dev/sda bs=4M status=progress

Restore a disk image back onto a disk

Writes the image file back over /dev/sda block-for-block, completely wiping whatever is on the disk, so confirm the target device carefully. This is how a dd backup is restored after a drive failure. Related: dd if=/dev/sda of=/backup/disk.img creates the image.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.