Restore Data - Solaris File System iDataAgent - Full System Restore

Topics | How To | Full System Restore | Related Topics


Overview

Perform a Full System Restore


Overview

The difference between a normal restore and a full system restore is the severity of the problem. Normally, if data is lost or removed, it is recovered from the archives using the normal restore procedures. However, when a normal restore operation cannot correct a software and/or hardware corruption problem, some additional changes may be required.

When the root file system is lost, a full system restore is required.


Perform a Full System Restore

Select the appropriate method:

Before You Begin

On a Solaris system, you can use either the jump start server method or the miniroot method to perform a full system restore. The jump start server method is considered the easier of the two methods because you do not need to use an additional drive for rebooting purposes. The latter steps for both methods are identical.

The jump start server method includes the following general steps (detailed instructions are provided in the following section): 

  1. Copy the jump start software to your machine.
  2. Add clients that will boot off of the jump start server
  3. Create a new root directory, and add the required system hosts, shared memory, and system services.
  4. Create and mount a root file system on the system that you want to restore.
  5. If any additional file systems were lost, create and mount them as well.
  6. Use the Solaris File System iDataAgent to restore your data.

The miniroot method includes the following general steps (detailed instructions are provided in the following section):

  1. Install a Core System Support partition on the system that you want to restore.
  2. If the whoami command is not available on your system, follow the workaround provided.
  3. Install the Solaris File System iDataAgent on the Core System Support partition.
  4. Create and mount a root file system on the system that you want to restore.
  5. If any additional file systems were lost, create and mount them as well.
  6. Use the Solaris File System iDataAgent to restore your data

Try to avoid the unconditional overwrite of the root directory on a live file system. This is a mechanism that allows an unconditional overwrite of open files in the root directory (/) on a live file system. Performing such a restore can result in an inconsistent system that may also fail to boot. Use this option AT YOUR OWN RISK.

Perform a Full System Restore for Solaris 10 Update 5 and Below

Select the desired method:

To perform a full system restore using the jump start server method:

  1. From the appropriate Solaris CD-ROM (e.g., Solaris 8), navigate to the appropriate Tools directory (e.g., s0/Solaris_8/Tools directory).

  2. Enter the following command to copy the jump start software to your machine.

    ./setup_install_server -b /opt/boot 

  3. For each client that you want to boot off of the jump start server, enter the appropriate add command. For example, the following example implies that three such clients will be booted.

    ./add_* -i 172.19.71.226 -e 8:0:20:7c:89:1a -s pluto8:/jumpstart pluto6 sun4u
    ./add_* -i 172.19.71.227 -e 8:0:20:7d:e6:33 -s pluto8:/jumpstart pluto7 sun4m 
    ./add_* -i 172.19.71.224 -e 8:0:20:7c:73:f -s pluto8:/jumpstart pluto4 sun4m 

  4. Copy <mnt_point>/Solaris_8/Tools/Boot from the CD-ROM to a shareable directory (e.g., /jumpstart).

  5. Modify /etc/bootparams to reflect the new root directory (i.e., not the CD-ROM slice).

  6. Modify <mnt_point>/Solaris_8/Tools/Boot/.tmp_proto/root/etc/inet/hosts to add the hosts needed to communicate with the Solaris File System iDataAgent.

  7. Modify <mnt_point>/Solaris_8/Tools/Boot/etc/system to add shared memory information. For example:

    set shmsys:shminfo_shmmax=4199304
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmni=5824
    set shmsys:shminfo_shmseg=5824
    set semsys:seminfo_semmns=5824
    set semsys:seminfo_semmni=5824
    set semsys:seminfo_semmsl=5824
     

  8. Modify <mnt_point>/Solaris_8/Tools/Boot/etc/services to add system services. For example:

    cvd 8400/tcp 
    EvMgrS 8401/tcp 
    EvMgrC 8402/tcp 

  9. Create symbolic links for required writeable areas in <mnt_point>/Solaris_8/Tools/Boot/etc/. For example: 

    ln -s ../tmp/root/etc/inet/Galaxy.pkg Galaxy.pkg 
    ln -s /tmp/CommVaultRegistry CommVaultRegistry

     
    Then let the system boot.

  10. Using an open slice, create and mount a /opt file system (e.g., swap slice).
  11. Install the Solaris File System iDataAgent software. If the installer requests patches and the required patches have not been installed on the jump start server, skip the request to add the additional operating system patches. See Deployment - Unix File System iDataAgents for instructions. When the Solaris File System iDataAgent is installed, continue with the next step.
  12. Create partitions/slices on the disk by entering the following command:

    format
  13. Create the root file system by entering the command:

    newfs /dev/dsk/<DriveID>

    where <DriveID> is the Drive Identifier of the partition where you want to create the root file system.
  14. Mount the new root file system at /mnt by entering the following command:

    mount /dev/dsk/<DriveID> /mnt

    where <DriveID> is the Drive Identifier of the partition containing the root file system.
     
  15. Create an empty directory called proc on /mnt as follows:

    mkdir /mnt/proc
     
  16. If any other file systems existed on the root disk before the system crash, you must recreate them as well. For each file system, enter the command

    newfs /dev/dsk/<DriveID> 

    where <DriveID> is the Drive Identifier of the partition containing the file system that was lost.
  17. If you have recreated any file systems other than root, you must mount these as well. For each file system, enter the following commands:

    mkdir /mnt/<file_system_name>
    mount /dev/dsk/<DriveID> 
    /mnt/<file_system_name>

    where <file_system_name> is the name of the file system and <DriveID> is the Drive Identifier of the partition containing the file system.
  18. From the CommCell Console, right-click on the backup set that contains the backup data of the root file system, click All Tasks, click Restore, type / as the path to restore from, and exclude from the content of the restore any file systems that were not affected by the system crash.
    Do not select Unconditional Overwrite from the Restore Options dialog box.
  19. When restoring encrypted data, refer to Data Encryption.
     
  20. Click OK to start the restore.
     
  21. Verify that the restore operation has completed successfully, then reboot the computer. The system boots to the newly restored root.

This procedure is now complete.

To perform a full system restore using the mini-root method:

  1. When you perform a full system restore, the client computer must have a Core System Support partition with the Solaris File System iDataAgent installed on the Core System Support. Do not install the Core System Support on the disk that will contain the restored root file system. Install the Core System Support with the networking option enabled. The TCP/IP, hostname, and domain name settings of the Core System Support must match those of the system that you are restoring.
    If you install the Core System Support on an external drive, it can be used for other systems. However, you will have to remove and re-install the Solaris File System iDataAgent software for each client. In addition, you will have to reconfigure TCP/IP, hostname, and domain name settings for each system.


    Load a Core System Support partition on your system. (You can get installation instructions from the Sun website.) Once the software is installed, boot your system.

  2. From the eeprom console prompt ok: type the following command:

    boot <disk3

    where <disk3> is the path to the bootable core system.
  3. Log in from the console.
  4. After you log in to the system, if /usr/ucb/whoami does not exist, do the following:

    Enter these commands:
    cd /usr
    mkdir ucb
    cd ucb

    Use the vi utility to create a file called whoami. Type the following in the whoami file:
    echo root
    Save the file and quit vi.

    Enter the following command:
    chmod 755 whoami
  5. Install the Solaris File System iDataAgent software. See Deployment - Unix File System iDataAgents for instructions. When the Solaris File System iDataAgent is installed, continue with the next step.
  6. Create partitions/slices on the disk by entering the following command:

    format
    For x86 systems, be sure to use the fdisk command to partition the disk before you format it. This will allow you to add a "Solaris2" partition to hold the Solaris "slices". For example:

    fdisk /dev/rdsk/c1d0p0
  7. Create the root file system by entering the command:

    newfs /dev/dsk/<DriveID>

    where <DriveID> is the Drive Identifier of the partition where you want to create the root file system.
  8. Mount the new root file system at /mnt by entering the following command:

    mount /dev/dsk/<DriveID> /mnt

    where <DriveID> is the Drive Identifier of the partition containing the root file system.
     
  9. Create an empty directory called proc on /mnt as follows:

    mkdir /mnt/proc
     
  10. If any other file systems existed on the root disk before the system crash, you must recreate them as well. For each file system, enter the command

    newfs /dev/dsk/<DriveID> 

    where <DriveID> is the Drive Identifier of the partition containing the file system that was lost.
  11. If you have recreated any file systems other than root, you must mount these as well. For each file system, enter the following commands:

    mkdir /mnt/<file_system_name>
    mount /dev/dsk/<DriveID> 
    /mnt/<file_system_name>

    where <file_system_name> is the name of the file system and <DriveID> is the Drive Identifier of the partition containing the file system.
  12. From the CommCell Console, right-click on the backup set that contains the backup data of the root file system, click All Tasks, click Restore, type / as the path to restore from, and exclude from the content of the restore any file systems that were not affected by the system crash.
    Do not select Unconditional Overwrite from the Restore Options dialog box.
  13. When restoring encrypted data, refer to When restoring encrypted data, refer to Data Encryption.
     
  14. Click OK to start the restore.
     
  15. Verify that the restore operation has completed successfully, then reboot the computer. The system boots to the newly restored root.
  16. Reinstall the boot block in the disk partition.
    For SPARC systems, use the installboot command. For example:

    installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0

    For x86 systems, use the installgrub command. For example:

    installgrub - m /boot/grub/stage1 /boot/grub/stage2/dev/rdsk/c1d0s0
     
  17. Create an empty directory called "Temp" in <install directory>/Base. For example:

    mkdir /opt/calypso/Base/Temp

This procedure is now complete.

Perform a Full System Restore for Solaris 10 Update 6 and Above

Using the mini-root method:

  1. On the boot server, perform the jump start method as explained above in the section 'Using the jump start server method'.
  2. Install the jump start server on the Boot server

    cd <jumpstart_install_directory>

  1. Unpack miniroot (<miniroot_mnt_dir>=`pwd`/boot) by entering the following command:

      /boot/solaris/bin/root_archive unpack sparc.miniroot `pwd`/boot  

  1. Follow the steps given below if, on the client, Calypso was installed at /opt:

       cd <miniroot_mnt_dir>/etc/

    ln –s /tmp/calypso/CommVaultRegistry CommVaultRegistry

If Calypso was installed at a different directory, change the steps as follows:

       cd <miniroot_mnt_dir>

    ln –s /tmp/calypso opt/calypso

    ln –s  /tmp/calypso var/log/calypso

  1. Pack Miniroot

       pack miniroot /boot/solaris/bin/root_archive pack sparc.miniroot `pwd`/boot

  1. NFS export a directory with RW (Read/Write) permissions for the client to be recovered.

       /export/<mydir>

    where <mydir> is the name of the directory.

  1. Make sure the client gets all required permissions on this directory and its contents.
  2. From the Commcell console, restore CommVaultRegistry and /opt/calypso/* into /export/<mydir>

       cd to /export/<mydir>

    mkdir Log_Files

    mv Base32 Base

    mv iDataAgent32 iDataAgent

If you are using x64 Solaris, then:

mv Base/calypso Base32

rm –rf Base iDataAgent

  1. On the Client side, perform the following steps:
  2. Jumpstart the client using the boot server.
  3. Follow the prompts and get to a shell. Bring up all the interfaces.

       boot net -s

  1. Configure a default route.

       route add default <172.x.x.x>

    where <172.x.x.x> is the Gateway address

  1. Add the client IP address and hostname to:

       /etc/hosts

  1. Add the Media Agent and CommServe to:

      /etc/hosts

  1. Create partitions/slices on the disk by entering the command:
    format
    For x86 systems, be sure to use the fdisk command to partition the disk before you format it. This will allow you to add a "Solaris2" partition to hold the Solaris "slices". For example:

    fdisk /dev/rdsk/c1d0p0
  2. Create the root file system by entering the command:
    newfs /dev/dsk/<DriveID>

    where <DriveID> is the Drive Identifier of the partition where you want to create the root file system.

  1. Mount the new root file system at /mnt by entering the following command:
    mount /dev/dsk/<DriveID> /mnt 

    where <DriveID> is the Drive Identifier of the partition containing the root file system.

  1. If ZFS on Root partition, follow the steps given below to create zpools and file systems:

      zpool create –R/a <pool name>

    where <pool name> is the  zpool name created during the initial Solaris install.

    zfs create <pool name>/FS1

    where <pool name> is the  zpool name created during the initial Solaris install and FS1 is the file system name

    zfs set mountpoint=<first_mountpoint><pool name>/FS1

    where <first_mountpoint> refers to its original mountpoint and FS1 is the file system name

    fs create <pool name>/FS2

    where <pool name> is the  zpool name created during the initial Solaris install and FS2 is the file system name

    zfs set mountpoint=<first_mountpoint><pool name>/FS2

    where <first_mountpoint> refers to its original mountpoint and <pool name> is the zpool name created during the initial Solaris install.

  1. Continue the same steps to create all of the ZFS file systems
  2. Create a dump and swap the file systems, using the following command:

       zfs create –V <space required> <fsname>

    where <fsname> is the filesystem name. Example: /export/home

  1. One of the ZFS file system will have ‘/’ as the mount point, after creating this file system, follow the steps given below to export and re-import the Root Pool:

       zpool export <rpool>

    where <rpool> is the root pool name

    zpool import –R /a <rpool>

       where <rpool> is the root pool name

    zpool set bootfs=<fs_mp> <rpool>

    where <fs_mp> is the name of the file system that has the mount point = ‘/’  and <rpool> is the root pool name

    mkdir /tmp/calypso

    mount bootserver:/NFS/exported/myfolder /tmp/calypso

  1. Check if: /var/log/calypso is a link to /tmp/calypso
  2. If not, then use:

       ln –s /tmp/calypso /var/log/calypso

  1. To start the Recovery services, follow the steps given below:
    cd /opt/calypso

    mkdir /opt/calypso/Base/Temp/

    . ./galaxy_vm

    . ./Base/cvprofile

    svc_ctrl –focus $GALAXY_VM -start cvd

    svc_ctrl –focus $GALAXY_VM -start EvMgrC

    svc_ctrl –focus $GALAXY_VM -start cvfwd

  1. From the CommCell console, launch the Restore operation.
  2. Follow the steps given below to boot the client and restore all data:
  3. Set the variable          

       platform=`uname –i`

  1. Use the variable as directory, to map it to the correct Boot block.

Following command is for Solaris 10 Update 6 or above:

    installboot –F zfs /a/usr/platform/$platform/lib/fs/zfs/bootblk /dev/rdsk/<boot_disk>

    where <boot_disk> is the name of the disk to be booted

Following command is for Solaris 10 Update 5 or below:

       installboot /a/usr/platform/$platform/lib/fs/ufs/bootblk /dev/rdsk/<boot_disk>

    where <boot_disk> is the name of the disk to be booted

For x86 systems:

installgrub –fm /a/boot/grub/stage1/a/boot/grub/stage2 /dev/rdsk/<boot disk>
bootadm update-archive –R /a
init 6

This procedure is now complete.


Back To Top