Unix Disk Copier

Unix Disk Copier

Post by Nam » Sun, 04 Apr 1999 04:00:00



Please tell me how I can make a perfect copy of an Unix hard disk ?

 
 
 

Unix Disk Copier

Post by Lew Pitche » Sun, 04 Apr 1999 04:00:00



> Please tell me how I can make a perfect copy of an Unix hard disk ?


Assuming your original hd is /dev/hda and the backup is to go to
/dev/hdb, something like...

   cp /dev/hda /dev/hdb

would do it.
--

Lew Pitcher        |  If everyone has an angle, why
JOAT-in-training   |  are most of them so obtuse?

 
 
 

Unix Disk Copier

Post by Michael Maxwel » Mon, 05 Apr 1999 05:00:00




> > Please tell me how I can make a perfect copy of an Unix hard disk ?

> Assuming your original hd is /dev/hda and the backup is to go to
> /dev/hdb, something like...

>    cp /dev/hda /dev/hdb

Seems to me one would want to create a disk image using the "dd"
command.

--

                   -- Stop the attacks on Serbia NOW! --

 
 
 

Unix Disk Copier

Post by Lew Pitche » Mon, 05 Apr 1999 05:00:00





> > > Please tell me how I can make a perfect copy of an Unix hard disk ?

> > Assuming your original hd is /dev/hda and the backup is to go to
> > /dev/hdb, something like...

> >    cp /dev/hda /dev/hdb

> Seems to me one would want to create a disk image using the "dd"
> command.

either dd or cp would do the job.
 
 
 

Unix Disk Copier

Post by Tim Campbel » Tue, 06 Apr 1999 04:00:00



> Please tell me how I can make a perfect copy of an Unix hard disk ?


Use "dd" (not "cp".  "cp" only works on formatted devices so it can't
create an exact duplicate, it can't copy the partition table, etc.).

The trick is to specify the disks useing (a) the raw device and (b) use
slice "2" (the backup slice) because it spans the entire disk.

Thus with two identical drives, all data can be copied from one to the
other with:

dd if=/dev/rdsk/c0t0d0s2 of=/dev/dsk/c0t8d0s2

Substitute "c0t0d0" or "c0t8d0" in my examples for the correct
controller, target, and disks on your system, but make sure to use
"s2" (slice 2) - also be sure to use "rdsk" not "dsk".

Note that on large disks, this can take a while (I seem to recall it
took the better part of an hour to do a 4.2 GB drive -- of course I
didn't experiment with larger block sizes).

Add a decent blocksize to speed things along (bs=2048k, etc.)  just
check the "man" page for dd to get all the options.

Regards
Tim

--
---------------------------------------------------

  "Very funny Scotty... now beam down my clothes"
---------------------------------------------------

  tcampb01.vcf
< 1K Download