Configuration files used for cloning
IBM® Storage Protect Snapshot uses preprocessing and postprocessing configuration files during cloning operations. The functions that are provided by the processing scripts depend on the cloning environment where they are issued.
All processing configuration files and the scripts that
are defined in the configuration files must meet the following requirements:
- Files and scripts are stored on the clone system.
- Files and scripts have permissions for read and write access for the clone database instance owner. The preprocessing and postprocessing scripts have permissions for read and write access for the user who updates and runs the scripts. If the scripts are run by any user registered on the system, the scripts are owned by the root user. The root user has permission to read and write for the User, Group, and World user groups.
- Files and scripts have permission for read access for the production database instance owner.
Attention: If a write access level for the World
user group is given, there is a security risk.
An example of a preprocessing configuration file
for Oracle is:
/oracle/P01/acs/preprocessing.ini.
When adding processing configuration files, place each script on a
separate line as shown in the following example:/oracle/P01/acs/scripts/PreProcessing_stopsap.sh
/oracle/P01/acs/scripts/PreProcessing_stopdb.sh Both
processing configuration files support embedded user comments. A comment
line in the configuration file is denoted by the number sign character: #.
The scripts are specified with fully qualified file names. Each line
of the processing configuration file represents one processing script.
The IBM Storage Protect
Snapshot Offload
Agent, tsm4acs, uses these arguments and their
values when calling the scripts:- DBNAME_PROD
- The database name on the production system.
- DBNAME_CLONE
- The database name on the cloning system.
- DBHOST_PROD
- The host name of the production system.
- DBHOST_CLONE
- The host name of the cloning system.
- CLONE_TIMESTAMP
- The timestamp when the clone was created. This entry is also the
time when the production database is suspended and the FlashCopy® operation begins. The timestamp
format is
YYYYMMDDhhmmss. During preprocessing, the timestamp identifies when the previous FlashCopy clone is created. During postprocessing, the timestamp identifies when the current FlashCopy clone was created. - SCHEMA
- The database schema of the production database as specified by
the profile parameter DATABASE_SCHEMA. Depending
on SAP® Kernel release, this schema is
SAPR3orSAPDBname.
- SQL scripts with the extension
.sql. - Shell scripts with the extension
.sh. Shell scripts can be started by a database user who is different from the clone database user. For example, when installing the SAP license for the cloned SAP system, start the postprocessing shell script as the SAP administration usersidadm:scripts/PostProcessing_saplicense.sh:c01admBy adding
:c01admto the script file name, the script runs as userc01adminstead of userorac01. This addition requires that the owner of the script be the same as the user who is the intended operator of the script. In this example,c01admis the owner of the script. There is one exception. If a preprocessing or postprocessing script is owned by the root user, the script can be run by any user registered on the system.
The processing scripts that are defined in the processing
configuration files run sequentially. The return code of each script
is validated. The following values are used:
- RC=0
- Processing ends successfully. If this script is the last script to be run, continue cloning. If this script is not the last script, continue with the next script.
- RC=1
- Processing ends successfully with warning. If this script is the last script to be run, continue cloning. If this script is not the last script, continue with the next script.
- RC=2
- Processing ends with an error. Cloning immediately stops. No additional scripts run.
clone_preproc.<timestamp>
clone_postproc.<timestamp>