Rsync

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
[[wikipedia:Rsync|rsync]] is said to be useful for ''remote synchronization'' (hence the ''r'' as the first letter). However I've just found other meaning of the initial ''r'': It may mean '''Recovery'''!
[[wikipedia:Rsync|rsync]] is said to be useful for ''remote synchronization'' (hence the ''r'' as the first letter). However I've just found other meaning of the initial ''r'': It may mean '''Recovery'''!
 +
 +
 +
=== Disk Recovery ===
I had problems with my home computer and lost one harddrive. Alas, it contained collection of my family photos and videos collected during last ten years. No problem, I though, I have a backup. However to make things worse, the backup harddisk is also slightly demaged! It contains about 1% of back blocks. What shall I do now?
I had problems with my home computer and lost one harddrive. Alas, it contained collection of my family photos and videos collected during last ten years. No problem, I though, I have a backup. However to make things worse, the backup harddisk is also slightly demaged! It contains about 1% of back blocks. What shall I do now?
-
I tried various tricks, but usual copy programs just stop when they see a broken bit in a file. They prefer correctness. Rather copy nothing than produce not perfect result! Nice contribution to my favorite [[MartinRinard]] [[Image:RinardOOPSLA06.pdf|presentation]].
+
I tried various tricks, but usual copy programs just stop when they see a broken bit in a file. They prefer correctness. Rather copy nothing than produce not perfect result! Nice contribution to my favorite [[MartinRinard]] presentation: [[Image:RinardOOPSLA06.pdf]].
Refusing to copy image or video files just because there is one broken bit is not the right strategy. I don't care if a single frame in a five minutes video is broken! Just skip it. [[MartinRinard]] would say: we don't need perfect programs without errors, we need good enough ones. I can add: We don't need perfect pictures and movies, we need ones that look OK.
Refusing to copy image or video files just because there is one broken bit is not the right strategy. I don't care if a single frame in a five minutes video is broken! Just skip it. [[MartinRinard]] would say: we don't need perfect programs without errors, we need good enough ones. I can add: We don't need perfect pictures and movies, we need ones that look OK.
Line 14: Line 17:
Such operation takes ages (the I/O timeout is way to high and I don't know how to decrease it), but it mades the trick. All files are copied, some of them with errors, but usually just insignificant, so the picture or video still looks acceptably.
Such operation takes ages (the I/O timeout is way to high and I don't know how to decrease it), but it mades the trick. All files are copied, some of them with errors, but usually just insignificant, so the picture or video still looks acceptably.
 +
 +
=== Digital Aging ===
From time to time there are little ''flashes'', when the playback is demaged, but at least it is clearly visible that the recording is old! Which remains me: we are used to the fact that analog recordings age and get worse over time. I never expected something like that in digital era, but it just happened: some bits from my files are gone, demaged, yet most of the infromation is still there. My digital bits are aging!
From time to time there are little ''flashes'', when the playback is demaged, but at least it is clearly visible that the recording is old! Which remains me: we are used to the fact that analog recordings age and get worse over time. I never expected something like that in digital era, but it just happened: some bits from my files are gone, demaged, yet most of the infromation is still there. My digital bits are aging!

Revision as of 12:31, 29 June 2010

rsync is said to be useful for remote synchronization (hence the r as the first letter). However I've just found other meaning of the initial r: It may mean Recovery!


Disk Recovery

I had problems with my home computer and lost one harddrive. Alas, it contained collection of my family photos and videos collected during last ten years. No problem, I though, I have a backup. However to make things worse, the backup harddisk is also slightly demaged! It contains about 1% of back blocks. What shall I do now?

I tried various tricks, but usual copy programs just stop when they see a broken bit in a file. They prefer correctness. Rather copy nothing than produce not perfect result! Nice contribution to my favorite MartinRinard presentation: Image:RinardOOPSLA06.pdf.

Refusing to copy image or video files just because there is one broken bit is not the right strategy. I don't care if a single frame in a five minutes video is broken! Just skip it. MartinRinard would say: we don't need perfect programs without errors, we need good enough ones. I can add: We don't need perfect pictures and movies, we need ones that look OK.

For a while I wanted to write my own copying program. Just open java.io.RandomAccessFile, read 4KB, if OK, go on, if not flush out 4KB of zeros and go on as well. But then I realized there already is such a rescue tool:

rsync -ruv -P --ignore-existing /misc/demaged-disk/  /misc/newbackup/

Such operation takes ages (the I/O timeout is way to high and I don't know how to decrease it), but it mades the trick. All files are copied, some of them with errors, but usually just insignificant, so the picture or video still looks acceptably.

Digital Aging

From time to time there are little flashes, when the playback is demaged, but at least it is clearly visible that the recording is old! Which remains me: we are used to the fact that analog recordings age and get worse over time. I never expected something like that in digital era, but it just happened: some bits from my files are gone, demaged, yet most of the infromation is still there. My digital bits are aging!

Thanks to rescue sync and its relaxed ability to work with imperfect files I have now good enough family album back.

<comments/>

Personal tools
buy