From owner-freebsd-questions Tue Sep 16 16:45:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA27356 for questions-outgoing; Tue, 16 Sep 1997 16:45:10 -0700 (PDT) Received: from fly.HiWAAY.net (root@fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA27344 for ; Tue, 16 Sep 1997 16:45:05 -0700 (PDT) Received: from nospam.hiwaay.net (max7-197.HiWAAY.net [208.147.145.197]) by fly.HiWAAY.net (8.8.6/8.8.6) with ESMTP id SAA03041 for ; Tue, 16 Sep 1997 18:44:56 -0500 (CDT) Received: from nospam.hiwaay.net (localhost [127.0.0.1]) by nospam.hiwaay.net (8.8.7/8.8.4) with ESMTP id SAA11453 for ; Tue, 16 Sep 1997 18:44:54 -0500 (CDT) Message-Id: <199709162344.SAA11453@nospam.hiwaay.net> X-Mailer: exmh version 2.0zeta 7/24/97 To: questions@FreeBSD.ORG From: dkelly@hiwaay.net Subject: Re: Disk copying In-reply-to: Message from Doug White of "Mon, 15 Sep 1997 21:48:27 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 Sep 1997 18:44:53 -0500 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Doug White writes: > > On Sun, 14 Sep 1997 dkelly@HiWAAY.net wrote: > > > Justin Ashworth writes: > > > > > > What is the easiest and most reliable way to copy my data from one hard > > > drive to another? > > > Unless the two drives are identical, or at least the 2nd is larger, you > > could use "dd if=/dev/rsd0 of=rsd1 bs=1024k" or similar. Need to do more > > checking on the exact device to use for the copy, you want a "whole > > device" device, not one working out of slices. > > I just realized that I documented the safe way to do this in the disk > formatting tutorial (now at http://www.freebsd.org/tutorials/diskformat > -- update your URLs!). > > It's basically a tar c | tar x type operation except it calls pax > directly. (When I did it using dump/restore I didn't keep the command > lines, but the pax style was submitted to me and is equivalent.) Its something like: dump 0f - /src-filesystem | ( cd /dest-filesystem; restore rf - ) However, when restore finishes it asks if it should restore file ownership and modes. If you don't say "yes" then your result isn't really what we wanted. Haven't seen a way to disable that querry. Maybe the "y" option does that in addition to: y Restore will not ask whether it should abort the restore if it gets an error. It will always try to skip over the bad block(s) and continue as best it can. Have usually used "dump | restore" because Once Upon A Time "tar -cf - | tar -xf -" bit me and wrote multiple files where there was once a single file with multiple links. Am sure that wasn't a FreeBSD system. Might have been Linux. If not Linux then Sun or SGI. Think I need to port pax to SGI and Sun so I'll have it when I need it. -- 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.