Given a physical disk and an image created from it, I want to write the image back onto the physical disk, but only write the changed bytes or sectors. The use case is restoring images on an SSD - unlike HDDs these have a limited number of writes. The added reads do not cause wear on the SSD and might even speed up the restore process when barely anything changed.

  writing this img   [___|___|___|___|___|___|___|___|___]
back onto this disk: [___|___|_ab|c__|___|___|___|xyz|___] 
      actual writes:  nnn nnn YYY YYY nnn nnn nnn YYY nnn

If the writes are not per-sector (here: 3-byte sectors) but bytewise that would work as well. A final statistic regarding the number of total writes would be nice, too. dd can't do that, is there an existing tool for that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.