From owner-freebsd-questions@FreeBSD.ORG Sat Apr 26 11:28:33 2003 Return-Path: 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 7A7A637B409 for ; Sat, 26 Apr 2003 11:28:33 -0700 (PDT) Received: from grumpy.dyndns.org (user-24-214-34-52.knology.net [24.214.34.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67F6843F3F for ; Sat, 26 Apr 2003 11:28:32 -0700 (PDT) (envelope-from dkelly@grumpy.dyndns.org) Received: from grumpy.dyndns.org (localhost [127.0.0.1]) by grumpy.dyndns.org (8.12.9/8.12.9) with ESMTP id h3QIRS14077353; Sat, 26 Apr 2003 13:27:29 -0500 (CDT) (envelope-from dkelly@grumpy.dyndns.org) Received: from localhost (localhost [[UNIX: localhost]]) by grumpy.dyndns.org (8.12.9/8.12.9/Submit) id h3QIRSPK077352; Sat, 26 Apr 2003 13:27:28 -0500 (CDT) From: David Kelly To: Steve Bertrand Date: Sat, 26 Apr 2003 13:27:26 -0500 User-Agent: KMail/1.5.1 References: <20030426085634.A52990-100000@diana.northnetworks.ca> In-Reply-To: <20030426085634.A52990-100000@diana.northnetworks.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304261327.27230.dkelly@HiWAAY.net> cc: freebsd Subject: Re: tar FBSD disk clone X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Apr 2003 18:28:33 -0000 On Saturday 26 April 2003 08:00 am, Steve Bertrand wrote: > > > > Read the disklabel(8) man page, specifically "Installing > > bootstraps". I think you need to "disklabel -B ad0s1" (use the > > appropriate disk device and slice). > > As a matter of fact, I used #/stand/sysinstall to create my partition > on the disk, and I just used the 's' option to make it bootable. Then > I read the disklabel(8) man page, and found out how simple it really > was to use. I did not use the -B option, becuase I already made the > disk bootable with sysinstall. > > After I cut up the slice using disklabel, I did a #newfs ad0s1x to > all new areas, extracted the tar's onto the new disk, pulled the disk > out and put it into a new machine and away it went! > > I have since done the same procedure (cloning an entire production > box) without taking the original box offline! > > Works great! tar does not replicate the extra flags unique to BSD UFS. This will create an mtree template noting each files flags: # mtree -c -k flags -p / > flags.mtree Haven't tried it but believe this will hammer the above flags back onto your restored-from-tar system: # mtree -eUf flags.mtree -p / Ideally one would wish to trim the flags.mtree file down to only those files with bits set in their flags. Offhand I don't know an easy way to do that. Critical secruity related files will have "flags=schg" beside them in the above flags.mtree. -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system.