Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Oct 2002 13:18:55 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Mike Hogsett <hogsett@csl.sri.com>
Cc:        "Mr. Darren" <darren780@yahoo.com>, freebsd <freebsd-stable@FreeBSD.ORG>
Subject:   Re: copy harddrive image 
Message-ID:  <200210292118.g9TLIt49010760@apollo.backplane.com>
References:   <200210292048.g9TKmG1J015723@axp.csl.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help

:> I have had a harddrive which is doing the SMART imminent failure thing
:> for the last little while.  I had western digital send me a new drive so
:> I could copy all my data over.  I am wondering what the best way to do
:> this is?  "dd if=ad0 of=ad1" doesn't seem to be like a good method..
:> any input?
:
:That method has worked great for me in the past.  But I have usually done
:this with brand new disks (source being freshly installed).  Also no
:partitions on either disk were mounted.
:
:I would add the argument bs=131072
:
: - Mike

    What I usually do is fdisk and disklabel the new disk, which gives
    me a chance to adjust the size of the partitions.  I then dd each
    partition across (e.g. dd if=ad0s1a of=ad1s1a) for those partitions
    whos sizes didn't change, fsck them after I'm done, and use 'cpdup'
    (/usr/ports/sysutils/cpdup) to copy the rest via mounts.

    The advantage of using cpdup is that you can do it on a live system,
    take the system down to single user, do cpdup again to catch
    whatever changes from the first run (usually very little, so cpdup
    only takes a few seconds the second time), then power off, swap the
    drives, and reboot.  Total actual down time: 5 minutes or less.

    DDing the entire disk works too, at least if the system is idle.  Be
    sure to fsck the destination drive though before mounting it.

						-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210292118.g9TLIt49010760>