From owner-freebsd-questions Mon Feb 13 04:47:24 1995 Return-Path: questions-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id EAA00142 for questions-outgoing; Mon, 13 Feb 1995 04:47:24 -0800 Received: from late5.e-technik.uni-erlangen.de (late5.e-technik.uni-erlangen.de [131.188.254.132]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id EAA00154 for ; Mon, 13 Feb 1995 04:32:58 -0800 Received: (from eilts@localhost) by late5.e-technik.uni-erlangen.de (8.6.8.1/8.6.6) id KAA07203; Mon, 13 Feb 1995 10:52:11 +0100 From: Hinrich Eilts Message-Id: <199502130952.KAA07203@late5.e-technik.uni-erlangen.de> Subject: Re: Cloning a hard disk/system To: crtb@helix.nih.gov (Chuck Bacon) Date: Mon, 13 Feb 1995 10:52:10 +0100 (MEZ) Cc: questions@FreeBSD.org In-Reply-To: <9502110107.AA27242@helix.nih.gov> from "Chuck Bacon" at Feb 10, 95 08:07:31 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1405 Sender: questions-owner@FreeBSD.org Precedence: bulk > > > Any quick idea of how to do this?? > > How about back to back tar? Assuming the new disk has a filesystem, > and is otherwise empty (say the a partition): > > # mount /dev/wd1a /mnt # Gotta put the new disk somewhere! > # cd / # (Assume new disk has a FS and ready) > # foreach f (`echo * | sed 's/mnt//'`) > # tar cf - $f | (cd /mnt; tar xvfp -) > # end > > This gets a bit more involved if you have multiple partitions on the > original or the new disk, but can be handled analogously. > > > Thanks, > > > Troy > > I'm sending this back to questions, because I'd like to hear if > there's a big flaw in it somewhere. I've copied some pretty big > directory trees this way, but not entire disks. Does above tar-solution work with files containing holes? I have a file (on HPUX at work, but a similar is at home on FreeBSD) late5(eilts):infosystems/WWW/cgi-etc: ll idx-usr-man_i.pag -rw-r--r-- 1 www www 247309312 Feb 12 10:42 idx-usr-man_i.pag late5(eilts):infosystems/WWW/cgi-etc: du idx-usr-man_i.pag 12320 idx-usr-man_i.pag "cp", "cpio", ... expands it to full size resulting in a full disk. Hinrich -- Hinrich Eilts Uni: eilts@late.e-technik.uni-erlangen.de | G i b D O S | Priv.: eilts@tor.dialin.rrze.uni-erlangen.de | k e i n e | http://late5.e-technik.uni-erlangen.de/user/eilts.html | C h a n c e ! |