Skip Headers
Oracle Hierarchical Storage Manager and QFS Software Command Reference
Section 1m: Maintenance Commands
Release 6.1.1
E70305-03

NAME

recover.sh - Recovers files archived after last samfsdump (1m) was taken

SYNOPSIS

∕opt∕SUNWsamfs∕examples∕recover.sh mount_point

AVAILABILITY

SUNWsamfs

DESCRIPTION

The recover.sh script recovers files using the information in the archiver log. This script can be useful in a disaster recovery situation when a file system has been lost and is recovered from a saved samfsdump (1m) file. If files were archived for the first time after the dump was taken, there is no record of them in the dump. This script can be used to reload those files from the archive copy by using the star (1m) program.

USAGE

  1. Edit the archiver log file and extract the relevant portion.

    In this editing session, you should eliminate entries for second, third, or fourth archive copies from this file because otherwise the files are recovered multiple times, which wastes time. You should also eliminate directory entries. Directory entries are noted by a d in field 12 of the archiver log.

    After the file is edited, save the edited file to a temporary file. For example, save this file to ∕tmp∕arlog.in.

  2. Copy the script from its default location to a temporary location.

    Use a command such as the following to copy the script to a temporary location:

    server# cp ∕opt∕SUNWsamfs∕examples∕recover.sh ∕tmp∕recover.sh
    
  3. Edit a working copy of the script and modify it for your site.

    Edit the copy and change the value of BLK_SIZE from 128 to the block size in kilobytes for the VSNs in question.

  4. Run the recover.sh script.

    This creates a new script to actually do the work of recovering the files. In the following example, the Oracle HSM mount point is ∕sam1.

    server# ∕tmp∕recover.sh ∕sam1  ∕tmp∕arlog

    If you have multiple drives and want to recover from more than one VSN at a time, you can split this script into pieces first. The following line appears at the end of the work for each VSN:

    #  ----------- end of files for vsn  XXX  ---------
    
    The XXX is replaced with the VSN's bar code label.

  5. Create a temporary directory to which the recovered files can be written.

    Create this directory in an Oracle HSM file system. Although this could be your mount point, it is probably better to recover to a temporary directory in the Oracle HSM file system first, and then move the files to their final location after recovery is complete and everything looks as expected. For example:

    server# mkdir ∕sam1∕recover
    
  6. Change to the temporary directory to receive the recovered files.

    Use the cd (1) command to change to the directory in which you want the files recovered.

    server# cd ∕sam1∕recover
    server# sh -x ∕tmp∕recover.out
    
  7. Run the recover.out script.

    The ∕tmp∕recover.out shell script is created in the previous step. It can be used to recover all the files listed in the ∕tmp∕arlog.in file.

    Run the recover.out script. If you have split the scripts, you may have to run it multiple times.

WARNINGS

Improper use of this script can damage user or system data. Please refer to the Disaster Planning and Recovery Guide or contact technical support before using this script.

NOTES

If used with the SAM-Remote clients or server, the recovery must be performed on the server to which the tape library is attached.

Do not run multiple recovery scripts at the same time.

FILES

This script resides in the following location:

∕opt∕SUNWsamfs∕examples∕recover.sh

SEE ALSO

archiver (1m), request (1), star (1m).