From owner-freebsd-questions@FreeBSD.ORG Fri Feb 10 15:27:20 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C98AD16A422 for ; Fri, 10 Feb 2006 15:27:20 +0000 (GMT) (envelope-from ken@allenmyland.com) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.200.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2B4443D4C for ; Fri, 10 Feb 2006 15:27:19 +0000 (GMT) (envelope-from ken@allenmyland.com) Received: from bserver.transpack.com ([68.80.195.248]) by comcast.net (sccrmhc12) with ESMTP id <2006021015271701200seu3ge>; Fri, 10 Feb 2006 15:27:17 +0000 Received: from localhost (localhost.transpack.com [127.0.0.1]) by bserver.transpack.com (Postfix) with ESMTP id 2960AB843 for ; Fri, 10 Feb 2006 10:27:17 -0500 (EST) Received: from bserver.transpack.com ([127.0.0.1]) by localhost (bserver.transpack.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06468-08 for ; Fri, 10 Feb 2006 10:27:14 -0500 (EST) Received: from [192.168.214.102] (kbuilt.transpack.com [192.168.214.102]) by bserver.transpack.com (Postfix) with ESMTP id A7036B842 for ; Fri, 10 Feb 2006 10:27:14 -0500 (EST) Message-ID: <43ECB0CB.1040005@allenmyland.com> Date: Fri, 10 Feb 2006 10:27:07 -0500 From: Ken Stevenson User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.org References: <200602092036.k19KaIhn086956@dc.cis.okstate.edu> <20060209220123.GA4751@flame.pc> In-Reply-To: <20060209220123.GA4751@flame.pc> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at transpack.com Cc: Subject: Re: Using dd to Make a Clone of a Drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2006 15:27:20 -0000 Giorgos Keramidas wrote: > On 2006-02-09 14:36, Martin McCormick wrote: >> After installing FreeBSD5.4, the ISC dhcp server and ISC bind >> on a hard drive, I wanted to clone that drive to a second drive so as >> to generate a second server, using what I had already installed as a >> template. I used the following command: >> >> dd if=/dev/da0 of=/dev/da1 bs=512 >> >> It turns out that dd defaults to 512-byte blocks so I didn't >> really need the bs=512, but I am not sure I haven't made some other >> type of mistake. The dd command has been running for about 4 hours on >> a very fast system, with a 1-gig processor, 1 gig of RAM and two 31-GB >> drives. One would think it should have finished by now, but it is >> still running. Is this a valid method of copying the entire contents >> of one drive to another? Thank you. > > Bah! That's too slow for my taste. I would usually go for a newfs, > dump, and restore option. For instance, to create a copy of /usr on a > second disk: > > newfs -U /dev/ad1s1a > mount /dev/ad1s1a /mnt > dump -0 -a -L /usr | ( cd /mnt ; restore ruvf - ) > > Copying with dd(1) is not as fast :) > I had to clone a couple systems a while back, and I also did it with dump/restore. The best part was this was the first time I actually restored my backups to a bare hard drive. It gave me a lot of confidence that my backups actually work. I think a lot of people find out too late that whatever backup solution they're using is flawed and they can't rebuild their system from it. -- Ken Stevenson Allen-Myland Inc.