Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 10:49:50 -0500
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        krad <kraduk@googlemail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: dd copy of FreeBSD-7.2 won't boot
Message-ID:  <20090625154950.GA83146@keira.kiwi-computer.com>
In-Reply-To: <2C153FCDAC3B43BDADDD1B28CED80036@uk.tiscali.intl>
References:  <20090623032742.M54551@ezo.net> <2C153FCDAC3B43BDADDD1B28CED80036@uk.tiscali.intl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 24, 2009 at 11:11:21PM +0100, krad wrote:
> Personally id stay away from dd. Create the partitions and file systems
> manually, and install the boot loader, then rsync the data across. It will
> be a lot faster in most cases, as unlike dd you wont be copying unused
> space. Something like this should do the job

I wouldn't say rsync is faster than dd, unless you have a lot of empty
space or are migrating across a network.  The nice thing about rsync is it
if you restart it, it picks up where it left off so to speak.  With dd you
have to add two arguments.

> Rsync -aPH --exclude=/mnt/** / /mnt
  ^

I often use:

	rsync -avHSPx / /mnt

The "x" means don't cross file system boundaries, which is generally what
you want when migrating file systems.

> I'm assuming you weren't migrating due to a bad disk

Actually using rsync to migrate a bad disk is preferrable over dd
(presuming you have no backup), since rsync will skip and warn you aboud
bad files, but "dd conv=noerror" could leave you in a bad situation if it
skips over critical metadata blocks.  I always try rsync first, with the
source filesystem mounted read-only, and if that fails I'll fall back to
dd.  Actually if you have the space and it was a bad disk, I'd probably dd
to a new disk or file, then mount that disk or file read-only, and then use
rsync.

-- Rick C. Petty



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