Rsync

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: rsync is said to be useful for ''remote synchronization'' (hence the ''r'' as first letter). However I've just found out other meaning of the initial ''r'' recently: It...)
Current revision (12:37, 29 June 2010) (edit) (undo)
(typos)
 
(3 intermediate revisions not shown.)
Line 1: Line 1:
-
[[wikipedia:Rsync|rsync]] is said to be useful for ''remote synchronization'' (hence the ''r'' as first letter). However I've just found out other meaning of the initial ''r'' recently: It means '''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'''!
-
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]].
+
=== Disk Recovery ===
 +
 
 +
I had problems with my home computer and lost one hard drive. 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 hard disk is also slightly damaged! 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.
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 10: Line 13:
<source lang="bash">
<source lang="bash">
-
rsync -ruv -P --ignore-existing /misc/demaged-disk/ /misc/newbackup/
+
rsync -ruv -P --ignore-existing /misc/damaged-disk/ /misc/newbackup/
</source>
</source>
-
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 does the trick. All files are copied, some of them with errors, but usually just insignificant, so the picture or video still looks acceptably.
-
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!
+
=== Digital Aging ===
-
Thanks to [[Rsync|rescue sync]] and its relaxed ability to work with imperfect files I have now good enough family album back.
+
From time to time there are little ''flashes'', when the playback is damaged, 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, damaged, yet most of the information is still there. My digital bits are aging! However thanks to [[Rsync|rescue sync]] and its relaxed ability to work with imperfect files I still have now good enough (yet aged) family album with me.
<comments/>
<comments/>

Current revision

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 hard drive. 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 hard disk is also slightly damaged! 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/damaged-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 does 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 damaged, 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, damaged, yet most of the information is still there. My digital bits are aging! However thanks to rescue sync and its relaxed ability to work with imperfect files I still have now good enough (yet aged) family album with me.

<comments/>

Personal tools
buy