[NBLUG/talk] Recovering data from a failing hard disk

Mitch Patenaude mrp at sonic.net
Mon Aug 23 19:04:37 PDT 2004


> I hadn't thought to use cpio, but it does look like a better way.  But
> how will cpio react if it encounters an Input/Output error (and I'm 
> sure
> it will encounter a few)?

Most of the I/O errors will be handled by the filesystem/kernel, before
cpio can get at them, but that would be the case with dd as well.  cpio
was/is a filesystem backup utility though, so I'm assuming it does
something quasi-intelligent with them.  I don't know how either handles
a SIGPIPE or a EIO return from read(2).

>>
>> Note: it's vital that find print the names relative to the mount point
>> of the old drive.
>
> I'd already figured that much out.

Yeah.. I figured you had, but this is for the person who stumbles across
this in the archives, decides to optimize it and types 'find /old/disk/ 
...'
without thinking about the implications... I think that's what I did the
first time I tried this trick.

BTW... you can use this as a poor man's scp as well...  I used to in a
previous life.

cd /local/path; find . -print0 | cpio -o0 | ssh -C root at remote.host 'cd 
/remote/path; cpio -idmv'

   -- Mitch










More information about the talk mailing list