[How To] Restore Solaris with ufsrestore

We had a hardware failure and we cannot seem to boot to our system. Our only option is to restore from our backup. The good thing is that we have foreseen this incident and took the liberty to have a backup of our OS. We will now use ufsrestore to bring our server up and running.

From the man pages of ufsrestore(1M):

The ufsrestore utility  restores  files  from  backup  media created  with the 
ufsdump command. ufsrestores's actions are controlled by the key argument. The 
key is exactly one function letter  (i,  r, R , t, or x) and zero or more 
function modifiers (letters). The key string contains no SPACE  characters.  
Function  modifier arguments are listed on the command line in the same order 
as their corresponding  function modifiers appear in the key string.

Boot the machine into cdrom single user-mode:

ok> boot cdrom -s

Re-partitionn your disk just like the old disk. Then format all the slices using newfs:

[email protected]# newfs /dev/rdsk/c0t0d0s0

Then mount this to any mount point:

[email protected]# mount /dev/dsk/c0t0d0s0 /a

Verify the existence of the tape:

[email protected]# mt -f /dev/rmt/0 status

[email protected]# mt status

If in case the tape drive is not recognized:

[email protected]# devfsadm -C
[email protected]# devfsadm -c tape
[email protected]# drvconfig; tapes; devlinks

Rewind the tape:

[email protected]# mt rewind

Make your way to the directorywhere you want to restore and start the restoration:

[email protected]# cd /a
[email protected]# ufsrestore rvf /dev/rmt/0n

After the restoration, install the bootblk:

[email protected]# cd /a/usr/platform/`uname -i`/lib/fs/ufs/
[email protected]# installboot bootblk /dev/rdsk/c0t0d0s0

Then restart and boot your way to your newly restored Solaris OS.

[email protected]# init 0
ok> boot

There you have it fellow SysAdmins! See you on my next note!

Readers who found this post were searching for:

  • ufsrestore
  • ufsrestore solaris
  • solaris ufsrestore
  • ufsrestore command in solaris
  • ufsrestore command in solaris 10
  • ufsrestore solaris 10
  • ufsrestore in solaris 10
  • solaris ufsdump ufsrestore
  • ufsrestore in solaris
  • ufs restore