Difference between revisions of "Disk Images"
From Tomelec
(Created page with "== Create a compressed image of a disk == The whole disk (SD-card) is read and piped through ''gzip'' for compression. <nowiki>dd if=/dev/mmcblk0 bs=1M | gzip --stdout > ./image...") |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == Create a compressed image of a disk == | + | == Create and restore a compressed image of a disk == |
− | The whole disk (SD-card) is read | + | The whole disk (SD-card) is read, piped through ''gzip'' for compression and written to the ouput file ''image.gz''. |
<nowiki>dd if=/dev/mmcblk0 bs=1M | gzip --stdout > ./image.gz</nowiki> | <nowiki>dd if=/dev/mmcblk0 bs=1M | gzip --stdout > ./image.gz</nowiki> | ||
+ | |||
+ | Restore: | ||
+ | <nowiki>gunzip --stdout image.gz | dd of=/dev/mmcblk0 bs=1M</nowiki> | ||
+ | |||
+ | Note: | ||
+ | *both commands require root privileges | ||
+ | *be '''very careful''' to choose the right device when restoring! |
Latest revision as of 16:19, 20 September 2011
Create and restore a compressed image of a disk
The whole disk (SD-card) is read, piped through gzip for compression and written to the ouput file image.gz.
dd if=/dev/mmcblk0 bs=1M | gzip --stdout > ./image.gz
Restore:
gunzip --stdout image.gz | dd of=/dev/mmcblk0 bs=1M
Note:
- both commands require root privileges
- be very careful to choose the right device when restoring!