HP Storage Mirroring V5 Software User Manual
Page 168

12
-
10
SPOSTBACK.TXT (continued)
# Restore target data to source before #
# recreating original connection #
# Restore ID should be 1 or greater, so exit on failure #
$restID=RESTORE
if $restID < 1 then
WRITE “restore failed from
WRITE $restID;
quit;
end
SOURCE
WAITONRESTORE $restID;
# Add a hard wait of 20 seconds to clear queues. #
WAIT 20000;
# Successful source returns 0, so exit on failure #
$ret = SOURCE
if $ret < 0 then
WRITE “Could not source
WRITE $ret;
quit
end
# Re-create original connection #
# Connection ID should be 1 or greater, so exit on failure #
$connectionID = CONNECT
if $connectionID < 1 then
WRITE “Could not connect
WRITE $connectionID;
quit;
end
# Successful mirror start returns 0, so exit on failure #
$ret = MIRROR START $connectionID DIFFERENT, CHECKSUM;
if $ret < 0 then
WRITE “Could not start mirror to
WRITE $ret;
quit;
end
WAITONMIRROR $connectionID;
WRITE “All operations completed successfully”;