Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Sep 1997 18:44:53 -0500
From:      dkelly@hiwaay.net
To:        questions@FreeBSD.ORG
Subject:   Re: Disk copying 
Message-ID:  <199709162344.SAA11453@nospam.hiwaay.net>
In-Reply-To: Message from Doug White <dwhite@gdi.uoregon.edu>  of "Mon, 15 Sep 1997 21:48:27 PDT." <Pine.BSF.3.96.970915214234.3096I-100000@localhost> 

next in thread | previous in thread | raw e-mail | index | archive | help
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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709162344.SAA11453>