12-24-2006
4,
0
Join Date: Dec 2006
Last Activity: 28 January 2007, 8:06 AM EST
Posts: 4
Thanks Given: 0
Thanked 0 Times in 0 Posts
I found a document that looks to be a set of instructions for restoring a sun backup on to different hardware. It reads like it might work. Can someone take a look and fill in any missing or unclear gaps. I only have basic unix skills. I can install/admin etc but thats it.
Who wants to be first to publish a guide using this as the frame work?
thank you.
==================start======================
Installing the operating system
Turn system on and from the “ok>” prompt run: -
Ok> probe-scsi-all
This will check that the system can see all the attached (physical) SCSI devices.
If all ok then insert the Installation CD and run :-
Ok> boot cdrom
This will start the installation and will prompt you warning messages (wrong magic numbers if disks not labelled)
Set up
Local UK-English
Hostname NDR
Networked No (YES for Legato/Netbackup )
NIS None
Subnet no
Timezone Europe/GB
Client Services no
Installation Entire Distribution including OEM support
**Point to remember:-
Any disks, which were previously used in a non sun system, will mean that the disk labels have been overwritten. The installation routine may exit due to this!
From the console window run “format” - to label each disk
Once each disk has been checked for a Solaris Label then the installation can be resumed by running “suninstall” from the same console window.
When prompted select “Auto Layout” and then “Customise” (to create file system layout)
Now set up the system as per their “df -k” ( Note this must be kept up to date)
Mount Remote Filesystems no
Begin Installation
Auto reboot
Set Root password None (This will be recovered from backup)
Power Saving no*
*You must respond to “no” for Power Saving otherwise the system will shutdown when there is little or no activity.
Restoring the customers backup
It is better to bring back the O/S first ie /, /usr, /var, /opt, /export/home then reboot single user mode to bring the rest of the user filesystems. This provides confidence that the system is ok using the backup of the O/S.
Login as root and bring system into single user mode.
* The following will alter depending on the type of backup that has been performed
Tape device as /dev/rmt/0
Ufsdump
These are created on a “per” filesystem (or per slice basis). Multiple usfdumps are written to the same tape and can be accessed sequentially using the “n” - non rewind switch.
You will now need to look at the Customers backup script to see what order they were created.
You may need to skip using “mt -f /dev/rmt/0n fsf X” (X=No backups to skip) This will position the tape correctly for the filesystem you wish to recover.
There are excludes needed for root (/) and the (/usr) filesystems. All others can be restore non-interactively.
Root filesystem restore:-
boot cdrom -s
Mount root filesystem on temporary mount point /mnt ie :-
# mount /dev/dsk/c0t0d0s0 /mnt
# cd /mnt
# ufsrestore -ivf /dev/rmt/0n
ls
add
delete /cdrom /dev /devices /kernel /platform /proc
cd /etc
delete devlink.tab device.tab mnttab name_to_major path_to_inst
delete driver_aliases driver_classes vfstab wtmpx utmpx
If the /usr directory is part of the / directory do :-
cd /usr
delete kernel
extract
volume # : 1
set owner / mode? no
set modes on directories? No
quit
If the /usr is separate filesystem do the following :-
For the /usr filesystem:-
Mount usr filesystem on temporary mount point /mnt ie :-
# mount /dev/dsk/c0t0d0s6 /mnt
# cd /mnt
# ufsrestore -ivf /dev/rmt/0n
ls
add
delete kernel
cd lib / ufs
delete ufsrestore
extract
volume # : 1
set owner / mode? no
set modes on directories? No
quit
Restore the /var and /opt filesystems these can be fully overwritten :-
For the /var filesystem:-
Mount usr filesystem on temporary mount point /mnt ie :-
# mount /dev/dsk/c0t0d0s1 /mnt
# cd /mnt
Make certain the tape is at the right partition
# ufsrestore -rf /dev/rmt/0n
A standard restore can be performed for the remaining filesystems.
CPIO recovery
Command:
# cpio -icvdum -f “*****” “*****2” “*****3” </dev/rmt/0
Create a file containing this it makes it easy to check/correct typos before execution!!
The patterns used when excluding files are the same as those used when performing a selective restore. e.g. “etc/utmp” or “./etc/utmp” (if relative) and “/dev/*” to exclude whole directories
TAR recovery
Command:
# tar -xvfX /dev/rmt/0 /exclude.list
When creating the exclude list you will need to set it up as “one file per line” and you don't need to include “*” when specifying directories*
* don't forget to use “./” if needed!
e.g.
/cdrom
/dev
/devices
/etc/utmpx
.
.
/usr/sbin/tar
Post restore
If Solstice Disk Suite (SDS) or Veritas Filesystems and Volume manager (VX) are being used then you will need to edit /etc/system and comment out any reference to both.
Disk Suite:-
SDS looks like /dev/md/....
Disable Veritas Volume manager: -
VX looks like /dev/vx....
*rootdev:/psuedo/vx....
*set vx.....
cd /etc/vx/reconfig.d/state.d
rm root-done
touch install-db
**Don't forget to change the password file as this has now been restored from tape as customers.
SUN EXCLUDES LIST:
/cdrom
/dev
/devices
/kernel
/platform
/proc
/etc/driver_aliases
/etc/driver_classes
/etc/devlink.tab
/etc/device.tab
/etc/mnttab
/etc/name_to_major
/etc/path_to_inst
/etc/vfstab
/etc/utmpx
/etc/wtmpx
/usr/kernel
/var/run
/etc/sysevent
/usr/lib/fs/ufs/ufsrestore (If this is used for recovery)
/usr/sbin/tar “
/usr/bin/cpio “
=================end=================