Date: Mon, 13 Feb 1995 10:52:10 +0100 (MEZ) From: Hinrich Eilts <eilts@late.e-technik.uni-erlangen.de> To: crtb@helix.nih.gov (Chuck Bacon) Cc: questions@FreeBSD.org Subject: Re: Cloning a hard disk/system Message-ID: <199502130952.KAA07203@late5.e-technik.uni-erlangen.de> In-Reply-To: <9502110107.AA27242@helix.nih.gov> from "Chuck Bacon" at Feb 10, 95 08:07:31 pm
next in thread | previous in thread | raw e-mail | index | archive | help
>
> > 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 ! |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502130952.KAA07203>
