beautypg.com

Sample windows script – HP XP Command View Advanced Edition Software User Manual

Page 448

background image

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

Changing

the copy pair status for each copy pair

” on page 232.

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

Sample Windows script

” on page 448

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

set cmdRetVal=%errorlevel%

if not "%cmdRetVal%"=="0" (

rem an error occur

echo Error!!

exit /b 1

)

rem Confirming the result of pair operation task

call GetTasks.bat taskID=task-ID retryInterval=5 retryCount=12

set cmdRetVal=%errorlevel%

if not "%cmdRetVal%"=="104" (

rem an error occur

echo Error!!

exit /b 1

)

Replication Manager CLI tools

448