Tuesday, April 14, 2009

Saving disk image with linux dd command

to save
dd if=/dev/sda bs=1024 | gzip > /path/to/image.gz

to restore:
gunzip < /path/to/image.gz | dd of=/dev/sda bs=1024

Note:
Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table.

No comments:

Post a Comment