Restore / Clone System

Hi All,

I have one server up and running and want to build similar to other machine; other machine has data which I am not interested in saving, I am new to this field, therefore need some guidance to move forward.

Both of my system has same configuration, viz disk sizes, memory, and both are mirrored also.

I'll greatly appreciate any pointer.

TIA,

Ted

[399 byte] By [urug] at [2007-11-25 23:19:55]
# 1

If it's not production machines ( you can stop them ), you can try to put one (or many) hard disk(s) from the second one in the first one, then with a dd command using the overlap slice(s) you can dump the entire system disk(s) to the disk(s) from the second machine.

dd if=/dev/dsk/cXtYd0s2 of=/dev/dsk/cUtVd0s2

For production machines ( I have to try because I want to do the same ), you can try with something like

rsh -n <FIRST-MACHINE> dd if=/dev/dsk/cXtYd0s2 | dd of=/dev/dsk/cXtYd0s2

or perhaps with an nfs share on the /devices or /dev directories of the first machine mounted on the second one ...

Please send me feedback.

francoislegal1 at 2007-7-5 18:07:57 > top of Java-index,General,Talk to the Sysop...
# 2

The dd command will work great but make sure the disks are the same size. If you dd a 18GB disk to a 36GB disk. The 36GB disk becomes a 18GB disk.

Being a little more labor intensive, you can also setup two disks with the second disk partitioned how you want it and newfs'd. Then use a ufsdump | ufsrestore type command combo. Take a look at the ufsrestore man page for an example of this. On large disks, the ufsdump | ufsrestore command combo may be faster then the dd command. dd copies everything including unused disk space whether it part of a partition or not. ufsdump | ufsrestore copies only what is used but this does require a pre-newfs of the file systems in question. Using this method, you can copy any size disk to another without worrying about the disk labeling and all that.

swoneill at 2007-7-5 18:07:57 > top of Java-index,General,Talk to the Sysop...