November 10th, 2010, 23:46
IFS=$(echo -ne “\n\b”);
for file in \
$(\
diff \
<(find /media/source/ -type f | sed ‘s|^/media/source/||’ | sort) \
<(find /media/destination/ -type f | sed ‘s|^/media/destination/||’ | sort) | \
grep ‘^<’ | cut -c3-);
do ddrescue -dvr10 \
/media/source/”$file” \
/media/destination/$(sed ‘s/[^a-zA-Z0-9 .]//g’ <(printf %q $file));
doneThere could be some MFT entries themselves for files in I/O areas. These files will be skipped and I don't think your script accounts for that. Also, in the case of fragmented files, instead of a full DD which images smoothly, this script could jump 100+ different places for these files, potentially damaging the platters and making previously recoverable data unrecoverable.
You're arguing that the script will hammer the drive, but the script touches the drive far less than a ddrescue would, in terms of time, sectors and seeks. ddrescue images the entire drive, rather than just the parts that need to be imaged. And file fragmentation is far more rare than you're implying. Even so we both know it's better for a disk to read 50MB is 10 locations than it is to read 320GB.
November 11th, 2010, 12:32
November 11th, 2010, 12:47
November 11th, 2010, 13:11
November 11th, 2010, 13:18
November 15th, 2010, 17:29
Powered by phpBB © phpBB Group.