Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h3>Point by point answer:</h3> <ol> <li><p>With running this, would I miss some part of the disk?</p> <ul> <li>no.</li> </ul></li> <li><p>Do you see some flaws?</p> <ul> <li>While units are differents. this implie double read at source and full read before write at destination. This will mostly improve backup time.</li> <li>there is a little probability of having MD5 matching while differences exists. This probability is reducted by using <em>SHA1</em> or <em>MD256</em> or other harder checksum algo. but this implie more resource on both ends. (See <a href="http://en.wikipedia.org/wiki/Birthday_problem" rel="nofollow">Birthday problem on wikipedia</a>)</li> </ul></li> <li><p>Could I win some time compared to the 500GB read/write?</p> <ul> <li>In case both units are already same, yes, because reading is generaly quicker than writting. (depending on processor, for checksum computation: this could be significant on very poor processors)</li> </ul></li> <li><p>Obviously I potentially write less to the target disk. Will I improve the lifetime of that disk?</p> <ul> <li>In this case, yes, but if you write only diff, this will go a lot faster and improve really you disks lifetime.</li> <li>When disk are different, you re-write whole disk, this is not efficient!</li> </ul></li> <li><p>I was thinking of leaving count to 1, and increasing the block size.Is this good idea/bad idea?</p> <ul> <li>I find this globally a bad idea. Why re-inventing wheel?</li> </ul></li> <li><p>Would this same script work with an image file as output?</p> <ul> <li>Yes.</li> </ul></li> </ol> <h3>Functionnality answer.</h3> <p>For jobs like this, you may use <code>rsync</code>! With this tools you may</p> <ul> <li>Compress data during transfer</li> <li>copy over network</li> <li>tunneling with SSH (or not)</li> <li>transfer (an write) only modified blocks</li> </ul> <h3>Using <a href="/questions/tagged/bash" class="post-tag" title="show questions tagged &#39;bash&#39;" rel="tag">bash</a>, <code>dd</code> and <code>md5sum</code></h3> <p>There is a kind of command I run sometime:</p> <pre><code>ssh $USER@$SOURCE "dd if=$PATH/$SRCDEV |tee &gt;(sha1sum &gt;/dev/stderr);sleep 1" | tee &gt;(sha1sum &gt;/dev/tty) | dd of=$LOCALPATH/$LOCALDEV </code></pre> <p>This will do a <em>full read</em> on souce host, than a <em>sha1sum</em> <strong>before</strong> sending to localhost (destination), than a sha1sum to ensure transfer before writting to local device.</p> <p>This may render something like:</p> <pre><code>2998920+0 records in 2998920+0 records out 1535447040 bytes (1.4gB) copied, 81.42039 s, 18.3 MB/s d61c645ab2c561eb10eb31f12fbd6a7e6f42bf11 - d61c645ab2c561eb10eb31f12fbd6a7e6f42bf11 - 2998920+0 records in 2998920+0 records out 1535447040 bytes (1.4gB) copied, 81.42039 s, 18.3 MB/s </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload