HP OpenView Storage Mirroring User Guide (360226-002, May 2004)

A - 42
DTCL Scripting Examples
This section shows examples of different script files.
Using batch files
To use a Storage Mirroring batch file, you must first create the following one-line batch file which initiates the Storage
Mirroring Command Line Client and specifies the name of the script to execute.
DataCopy. BAT
Basic getting started script
The following script will start a Storage Mirroring connection by creating a repset called Exchange and connecting it to the
machine Jersey.
Basic getting started script with failover
The following script will start a Storage Mirroring connection by creating a repset called Exchange and connecting it to the
machine Jersey. This script will also set up failover.
cd c:\Program Files\OpenView\Storage Mirroring
cmd /c DTCL -f "c:\Program Files\OpenView\Storage Mirroring\ scriptname.txt"
DataCopy.BAT Command Description
cd c:\Program Files\OpenView\Storage
Mirroring
Change to the directory where the Storage Mirroring program files are
located.
cmd /c DTCL -f “d:\Program Files
\OpenView\Storage Mirroring\
scriptname.txt”
Starts an instance of the command prompt, carries out the specified
command, and then stops.
In this case, the specified command is to run the Storage Mirroring
Command Line client with the file name option. The location of the
script is specified after the file name option.
NOTE: If you do not specify a path for the script file, Storage Mirroring will look in the directory where the DTCL -f
command was executed.
source indy;
repset create Exchange;
repset rule add c:\exchsrvr include, recursive;
repset rule add c:\exchsrvr\bin exclude;
repset rule add d:\exchsrvr include, recursive;
repset save;
connect Exchange to jersey map exact;
source indy;
repset create Exchange;
repset rule add c:\exchsrvr include, recursive;
repset rule add c:\exchsrvr\bin exclude;
repset rule add d:\exchsrvr include, recursive;
repset save;
connect Exchange to jersey map exact;
target jersey;
monitor create indy;
monitor move 205.31.4.193 to nic 3 interval 5 timeout 25;
monitor start indy;