Linux/Backup: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 8: Line 8:
</blockquote>
</blockquote>


* gzip image ohne dd
* gzip image without dd
<blockquote>
<blockquote>
<pre>
<pre>
Line 15: Line 15:
</blockquote>
</blockquote>


* bootloader
<blockquote>
<pre>
dd if=/dev/sda of=bootloader.img bs=446 count=1
</pre>
</blockquote>
* MBR + pertitiontable
<blockquote>
<pre>
fdisk -lu
dd if=/dev/sda of=mbr.img bs=512? count=1? 63?
</pre>
</blockquote>





Revision as of 15:01, 29 November 2012

DD

Backup

  • simple backup to image file
dd if=/dev/sda | gzip > image.dd.gz
  • gzip image without dd
gzip -c < /dev/hda1 > /tmp/partition_image.gz
  • bootloader
dd if=/dev/sda of=bootloader.img bs=446 count=1
  • MBR + pertitiontable
fdisk -lu
dd if=/dev/sda of=mbr.img bs=512? count=1? 63?


  • dd status
while /bin/true; do sleep 5; kill -USR1 `pidof dd`; done

oder 

watch -n N kill -USR1 `pidof dd` 

other

  • dd random
dd if=/dev/random bs=1M count=256 | gzip >./256-MB-random-data.bin

Links