Linux/Backup: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 1: Line 1:
== DD ==
== DD ==
* gzip image ohne dd
=== Backup ===
* simple backup to image file
<blockquote>
<blockquote>
<pre>
<pre>
gzip -c < /dev/hda1 > /tmp/partition_image.gz
dd if=/dev/sda | gzip > image.dd.gz
</pre>
</pre>
</blockquote>
</blockquote>


* dd
* gzip image ohne dd
<blockquote>
<blockquote>
<pre>
<pre>
dd if=/dev/random bs=1M count=256 | gzip >./256-MB-random-data.bin
gzip -c < /dev/hda1 > /tmp/partition_image.gz
</pre>
</pre>
</blockquote>
</blockquote>


* dd status
* dd status
Line 22: Line 25:


watch -n N kill -USR1 `pidof dd`  
watch -n N kill -USR1 `pidof dd`  
</pre>
</blockquote>
=== other ===
* dd random
<blockquote>
<pre>
dd if=/dev/random bs=1M count=256 | gzip >./256-MB-random-data.bin
</pre>
</pre>
</blockquote>
</blockquote>

Revision as of 14:57, 29 November 2012

DD

Backup

  • simple backup to image file
dd if=/dev/sda | gzip > image.dd.gz
  • gzip image ohne dd
gzip -c < /dev/hda1 > /tmp/partition_image.gz


  • 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