[SunHELP] Re: Mirroring the OS disk

Kovalev, Ivan sunhelp at sunhelp.org
Tue Nov 28 14:36:27 CST 2000


Alternatively I would suggest to use ufsdump :
 
logfile=< put your log file here >
#
#==========================================================
date > $logfile
 
echo "dumping
------------------------------------------------------1----root" >> $logfile
newfs /dev/rdsk/c0t1d0s0                                                >>
$logfile 2>&1
df -k | grep /mnt >/dev/null && umount /mnt
mount /dev/dsk/c0t1d0s0 /mnt
(ufsdump 0f  -  /dev/rdsk/c0t0d0s0  |  (cd /mnt; ufsrestore rf -))       >>
$logfile 2>&1
 
# move vfstab file 
        cp /mnt/etc/vfstab.disk1 /mnt/etc/vfstab
        ###########################################
umount /mnt
echo "***************** copy boot block *********** "    >> $logfile
cd /usr/platform/`uname -i`/lib/fs/ufs
installboot bootblk /dev/rdsk/c0t1d0s0                  >> $logfile 2>&1
date >> $logfile
cd /
 
echo "dumping ------------------------------------------------------2----
/usr/openwin" >> $logfile
newfs /dev/rdsk/c0t1d0s1
>> $logfile 2>&1
mount /dev/dsk/c0t1d0s1 /mnt
(ufsdump 0f  -  /dev/rdsk/c0t0d0s1  |  (cd /mnt; ufsrestore rf -))
>> $logfile 2>&1
 
cd /
umount /mnt
date >> $logfile
 
You got the idea...

Ivan Kovalev 
I/B/E/S Intl.Inc. 
IKovalev at ibes.com 
(212)437-8381 

 



More information about the SunHELP mailing list