Restore procedure with SOBAR

This section provides a detailed example of the restore procedure used with SOBAR.

In order to restore a file system, the configuration data stored from a previous run of mmbackupconfig and the image files produced from mmimgbackup must be accessible.

Throughout these procedures, the sample file system used is called smallfs. Where appropriate, replace this value with your file system name.

  1. Restore the metadata image files from mmimgbackup and the backup configuration data from mmbackupconfig with a dsmc command similar to the following:
    dsmc restore -subdir=yes /u/user/backup/8516/
  2. Retrieve the base file system configuration information.
    Use the mmrestoreconfig command to generate a configuration file, which contains the details of the former file system:
    mmrestoreconfig Device -i InputFile -F QueryResultFile
  3. Recreate NSDs if they are missing.
    Using the output file generated in the previous step as a guide, the administrator might need to recreate NSD devices for use with the restored file system. In the output file, the NSD configuration section contains the NSD information; for example:
    ######## NSD configuration ##################
    ## Disk descriptor format for the mmcrnsd command.
    ## Please edit the disk and desired name fields to match
    ## your current hardware settings.
    ##
    ## The user then can uncomment the descriptor lines and
    ## use this file as input to the -F option.
    #
    # %nsd:
    #   device=DiskName
    #   nsd=nsd8
    #   usage=dataAndMetadata
    #   failureGroup=-1
    #   pool=system
    #
    If changes are needed, edit the file in a text editor and follow the included instructions to use it as input to the mmcrnsd command, then issue the following command:
    mmcrnsd -F StanzaFile
  4. Recreate the base file system.
    The administrator must recreate the initial file system. The output query file specified in the previous commands can be used as a guide. The following example shows the section of this file that is needed when recreating the file system:
    ######### File system configuration #############
    ## The user can use the predefined options/option values
    ## when recreating the file system.  The option values
    ## represent values from the backed up file system.
    #
    # mmcrfs FS_NAME NSD_DISKS -j cluster -k posix -Q yes -L 4194304 --disable-fastea
      -T /fs2 -A no --inode-limit 278016#
    #
    # When preparing the file system for image restore, quota
    # enforcement must be disabled at file system creation time.
    # If this is not done, the image restore process will fail.
    Do one of the following to recreate the file system:
    • Edit the output file. Uncomment the mmcrfs command, and specify the appropriate file system name and NSD disk(s). Remove the -Q option to ensure quotas are not enabled. Save the changes and run the file as a shell script:
      sh OutputFile
    • From the command line, issue an mmcrfs command similar to the one in the output file, but specify the appropriate file system name and NSD disk(s). Do not specify the -Q option to ensure quotas are not enabled. The inode size and metadata block size must be the same in the file system in order to be restored as is in the original file system.
  5. Restore essential file system configuration.
    Using the mmrestoreconfig command, the essential file system configuration can be restored to the file system that was just created in the previous step. Quota is disabled in this step because the quota system must remain inactive until after the file system image has been restored. Filesets will also be restored and linked, if necessary, using a method specific for image restore. The --image-restore option should be used to restore the configuration data in the proper format for SOBAR; for example:
    mmrestoreconfig smallfs -i /tmp/smallfs.bkpcfg.out925 --image-restore
  6. Mount the file system in read-only mode for image restore with the following command:
    mmmount smallfs -o ro
  7. Perform the image restore; for example:
    mmimgrestore smallfs /u/user/backup/8516/mmPolicy.8551.D4D85229
  8. To optionally display the restored file system structure, use the following command:
    ls -l /smallfs/*
    The system displays information similar to the following:
    -rw-r--r-- 1 root root 1024 Sep 25 11:34 /smallfs/1Kfile.1
    -rw-r--r-- 1 root root 1024 Sep 25 11:34 /smallfs/1Kfile.2
    -rwxr--r-- 1 root root  238 Sep 25 11:34 /smallfs/generateChksums*
  9. Unmount the file system with the following command:
    mmumount smallfs
  10. Restore quota configuration.
    If any quota enforcement was used in the prior file system, it can be restored now using the mmrestoreconfig command. This step will not enable quotas if they were not in use at the time of the configuration backup. To restore the quota configuration, issue a command similar to the following:
    mmrestoreconfig smallfs -i /tmp/smallfs.bkpcfg.out925 -Q only
  11. Mount the file system in read-write mode with the following command:
    mmmount smallfs
  12. Delete the unusable HSM directory.
    The .SpaceMan directory contains file stubs from the former space management control information. This directory must be deleted prior to restarting HSM management. Use the following command:
    rm -rf /smallfs/.SpaceMan
  13. To optionally restart HSM, use the following command:
    dsmmigfs restart
  14. Resume HSM management on the newly reconstructed file system, to resume managing disk space and to permit recall of files, with the following command:
    dsmmigfs add /smallfs
  15. To optionally display the managed file system from HSM, use the following command:
    dsmls /smallfs/*
    All files are currently in the migrate state.
  16. To optionally begin recalling files by forcing a specific recall, use the following command:
    dsmrecall -Recursive /smallfs/*