# $Id: README,v 2.1.6.1 2002/06/12 18:24:22 ptle Exp $
#ident "$Source: /project/vras-cvs/src/common/cmd/vras/samples/sample_db_snapshot/README,v $"
#
#
# Copyright (c) 2002 VERITAS Software Corporation.  ALL RIGHTS RESERVED.
#
# UNPUBLISHED -- RIGHTS RESERVED UNDER THE COPYRIGHT
# LAWS OF THE UNITED STATES.  USE OF A COPYRIGHT NOTICE
# IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
# OR DISCLOSURE.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND
# TRADE SECRETS OF VERITAS SOFTWARE.  USE, DISCLOSURE,
# OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR
# EXPRESS WRITTEN PERMISSION OF VERITAS SOFTWARE.
#
#               RESTRICTED RIGHTS LEGEND
# USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT IS
# SUBJECT TO RESTRICTIONS AS SET FORTH IN SUBPARAGRAPH
# (C) (1) (ii) OF THE RIGHTS IN TECHNICAL DATA AND
# COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013.
#               VERITAS SOFTWARE
# 1600 PLYMOUTH STREET, MOUNTAIN VIEW, CA 94043
#

This directory contains a set of sample scripts that can be used
in vradmin ibc command to create snapshot of Secondary data volumes.
The snapshot created on the Secondary can be used to perform certain
off-host processing tasks such as Decision Support or running backups.

The sample scripts in this directory assume that the application
running on the Primary data volumes is a database application.


Files in this directory are:
---------------------------

quiesce    Puts the Primary volumes in application-consistency point.

           IMPORTANT: this script currently contains only echo statements.
           You need to modify the script to include actual commands to
           make the Primary volumes consistent at application level.
           Refer to the comments in the script for detailed information.

unquiesce  Resumes the application on the Primary.

           IMPORTANT: this script currently contains only echo statements.
           You need to modify the script to include actual commands to
           resume the application on the Primary.  Refer to the comments 
           in the script for detailed information.

prefreeze  Creates snapshot plexes for Secondary volumes to prepare
           for the snapshot command carried out in the onfreeze script.
           Enables FastResync on the Secondary volumes.

onfreeze   Takes snapshot of the Secondary volumes.

README     Explains how all of this works.

Notes: 
-----
   + Scripts postfreeze is not present in this directory because there
     is nothing to be done in the postfreeze script in this example.
   + For further information about the scripts, refer to the comments 
     in the scripts.

IMPORTANT!!!
-----------
   For this set of sample scripts to function correctly, you must:
   + provide actual commands in quiesce and unquiesce scripts
   + provide appropriate values in the CUSTOMIZATION sections in the
     prefreeze and onfreeze scripts.

*--------------------------------------------------------------------*
* Using this set of sample scripts in vradmin ibc command to create  *
* snapshot for Decision Support:                                     *
*--------------------------------------------------------------------*

Perform the following steps on the Secondary host:

1. Run:

   # vradmin -g <diskgroup> ibc <rvg_name> sample_db_snapshot <sechost_name>

2. After the vradmin ibc command in (1) returns, use the snapshot data 
   volumes <SNAP_PREFIX>-<vol_name> to bring up the database for 
   running Decision Support application.

3. When the Decision Support application completes, reattach the
   snapshot plexes to the Secondary data volumes using the following
   command:

   # vxrvg -g <diskgroup> -P <SNAP_PREFIX> snapback <rvg_name>

   Note: SNAP_PREFIX should be whatever set for the SNAP_FREFIX variable
         in the onfreeze script.
