Managing tasks with scripts, Example task cli procedure, Sample windows script – HP XP P9000 Command View Advanced Edition Software User Manual
Page 452: 452 sample windows script
Managing tasks with scripts
A task created using the Replication Manager GUI can be registered as a task to be executed using
the CLI. By creating a user script to execute the task in conjunction with performing a quiesce operation,
you can perform data backup linking with the application. By placing such a script on the management
server, copy pair operations on each host can be managed collectively and the execution results
confirmed from Replication Manager GUI.
Example task CLI procedure
This an example of how to perform an application (DBMS) backup using the following configuration:
•
A primary and remote site are defined as a Cnt Ac-J pair.
•
The P-VOL and S-VOL are defined as a BC pair in the remote site.
1.
Register a task to be executed using the CLI by running the Change Pair Status Wizard.
The following tasks need to be registered:
• A task that performs a resync operation of a BC pair
• A task that performs a split operation of a BC pair
• A task that performs a syncwait operation for the P-VOL of a Cnt Ac-J copy group
Select the CLI option in the Set Schedule screen for each task. For more information, see “
the copy pair status for each copy pair
2.
Create a script file to perform data backup linking with an application:
a.
Execute a task that performs a resync operation for a BC pair using the Replication Manager
CLI.
b.
Quiesce the application.
c.
Execute a task that performs a syncwait operation for a Cnt Ac-J pair using the Replication
Manager CLI.
d.
Execute a task that performs a split operation for a BC pair.
e.
Release the application from the quiesced state.
3.
Execute the task CLI script on the manangement server. (See “
for a partial example that demonstrates steps 2a, c, and d.)
Use task scheduling software (such as the Windows Task Scheduler) to execute the script.
4.
Confirm the result of the task execution using the Replication Manager GUI.
In the Task subwindow, click the
taskID
of the task executed by Replication Manager CLI to
open the Task History dialog.
Use the Replication Manager GUI if you want to edit, cancel, or delete a task.
Sample Windows script
The following script includes an example of executing a single task and confirming the execution. (A
complete script requires the execution of multiple tasks and quiesce operations.) You must replace
user-id, password, task-ID
with the appropriate values.
rem change current folder
cd "%ProgramFiles(x86)%\CVXPAE\ReplicationManager\RpMCLI"
rem executing pair operation task
call ExecuteTask.bat -u user-id -p password taskID=task-ID
Replication Manager CLI tools
452