Backing up a nearly dead HDD

Pekka Pietikainen pp at ee.oulu.fi
Tue Nov 27 15:36:52 UTC 2007


On Tue, Nov 27, 2007 at 02:11:42PM +0000, Andrew Haley wrote:
>  > Is there a way I can copy everything from one drive to another and keep the
>  > permissions from a dodgy drive to a working one? cp -ar seems an option, but
>  > it takes a while!
> 
> The traditional fast way is "dump -f - | restore -f -" [*] but I'm not
> sure dump handles extended attributes correctly.
> 
I had a broken drive once too, and I used LVM2 to migrate to a new drive.
First I added a new drive with enough space to the volume group, removed the
broken one from it and it (slowly) managed to move every block it could 
to the new drive.

Then I ran fsck -y on it, and after a long time most of the data was still
there.

Not too long afterwards I got 3 500GB drives and had my very own 1 TB 
RAID5 at home.

Anything that works at the filesystem level (tar, cp) seems to be pretty
painful with broken harddrives since they take very long to finally raise
their hands up and move on.

I think there's a "don't try too hard" version of dd that's intended for
broken media, you could also do a byte-to-byte copy with that (vs. LVM2) and
fsck afterwards.

-- 
Pekka Pietikainen




More information about the fedora-devel-list mailing list