[comp.unix.questions] Disk Backups

rrg@ibism.UUCP (Renato Ghica) (05/04/91)

Can any kind soul tell me the best way to make a physical copy of a 
disk (including all the filesystems on it ?) to another disk ?

tar seems to have problems copying files in /dev, and if there are disks
mounted with mountpoints on /, then the contents of those disks get
copied as well. 

dd only lets me do one partition at the time

I don't have volcopy on my SPARCstation ver 4.1.1

Being from the VMS world, I was hoping to find something similar to the
"BACKUP/IMAGE command", or a shadowing/mirroring implementation thereof.

Thanks...



HELP !
 
-- 
============================================================================

    Renato Ghica	
	Citibank                           Phone:   (212) 657-7664 
	111 Wall Street                    Fax:     (212) 825-8607
	17th floor / zone 10               E-Mail:   uunet!ibism!rrg
	New York City, New York    10043

============================================================================

zook@sweetpea.jsc.nasa.gov (Craig A. Zook 283-4206) (05/06/91)

In article <12397@ibism.uucp>, rrg@ibism.UUCP (Renato Ghica) writes:
|> Can any kind soul tell me the best way to make a physical copy of a 
|> disk (including all the filesystems on it ?) to another disk ?


The method I use is as follows and is for Sun computers.  If other
computers have the dump / restore command then this will probably work
for them.  This method will transfer a partition of data.  It assumes 
sd1c is the source and sd2c is the target.


1) Get the new disk ready (i.e. format, partition, newfs)
2) umount the partition to be copied (so no changes will occur during
   the copy.
3) mount the target partition at /a (someplace users don't have access)
4) execute the following:
   dump 0f - /dev/sd1c | (cd /a; restore rf -)
5) cd /a
6) rm restoresymtable
7) cd /
8) umount /a
9) fsck /dev/rsd2c
10) the target partition should now be an exact copy of the original.

Using SMD drives I am able to transfer about 800Mbytes / hour.

This method can be used to transfer data across a network.  The target
partition must be NFS mounted on the machine with the source partition.
Then run the dump/restore program on the machine with the source partition.
This is much slower (200 - 400 Mbyte / hour) but it seems to work.

--
Craig Zook   -   zook@sweetpea.jsc.nasa.gov
Systems Engineeering and Administration
McDonnell Douglas Space Systems Corp. - Engineering Services Division
(713) 283-4206

weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) (05/07/91)

In article <12397@ibism.uucp>, rrg@ibism.UUCP (Renato Ghica) writes:
|> Can any kind soul tell me the best way to make a physical copy of a 
|> disk (including all the filesystems on it ?) to another disk ?
[tar doesn't work]
|> dd only lets me do one partition at the time
|> I don't have volcopy on my SPARCstation ver 4.1.1
[looking for VMS BACKUP/IMAGE equiv]

1) dump | restore (designate stdout for dump file & stdin for restore)

2) if the drive geometries are identical, you can use dd to copy the 'c'
partition (the whole disk). Both disks should have all partitions
umount'd before doing this. I just used this when I was replacing a 1.2G
drive that was getting flaky. I wish I knew how long it took. I had to
go home while my wife would still let me in the door (every once in a
great while you find a disadvantage to marriage :-) ). I didn't think
about putting 'date' in the input buffer until I was half-way home :-(
NOTE: drive geometries MUST be the same to do this.

BTW: If you're trying to install a second SPARC I+ (and probably other
machines as well), you can connect the two machines via the SCSI bus,
bring up second machine to the > prompt (halted), and then access it's
drive via the first machine. Making the drive id's different is left as
an excersize for the reader.

weimer@ssd.kodak.com ( Gary Weimer )