Go to main content

Oracle SuperCluster Configuration Backup Utility - Recovery Guide

Exit Print View

Updated: June 2020
 
 

Restore the /u01 of a Database Zone

Database zones can have their /u01 located on a separate dataset. If so, the backup creates a ZFS stream for this second dataset and a specific restore is required.

  1. Check whether a Database zone has its /u01 on a separate dataset.
    # zonecfg -z myzone info fs dir=/u01
    
  2. If /u01 is not available or damaged, restore it.
    1. To proceed with the /u01 restore first check if the zpool hosting /u01 is available. Obtain the zpool from the .info file.
      # pool=`grep '/u01' /sharedPath/myzone.data.info | grep pool | awk '{print $3}'`
      
    2. Check if the zpool is online.
      # zpool list $pool
    3. If the pool is not online, obtain the raw device used by the pool, then recreate it.
      # device=`grep '/u01' /sharedPath/myzone.data.info | grep 'raw device' |awk '{print $4}'`
      # zpool create $pool $device
      
    4. If the dataset is not located directly in the zpool, recreate the dataset's parent.
      # u01Parent=${u01path%/*}
      # zfs create $u01Parent
      
  3. Receive the /u01 stream and set its mount point.
    1. Locate the .zfs file in osc-config-backup/domains/mydomain/SolarisZones/myzone and receive it.
      root# su - oscbackR
      oscbackR$ cd osc-config-backup/domain/mydomain/SolarisZones/myzone
      oscbackR$ cp u01pool.backup.date.zfs /sharedPath
      oscbackR$ exit
      root# cat /sharedPath/u01pool.backup.date.zfs | zfs receive -vF $u01path
    2. Obtain the mount point from the backup data and set it.
      # mountpoint=`grep '/u01' /sharedPath/myzone.data.info | grep mountpoint | awk '{print $3}'`
      # zfs set mountpoint=$mountpoint $u01path
      
  4. Destroy the remaining snapshot.
    # zfs destroy $u01path@osc-config-backup