HP StorageWorks SAN Virtualization Services Platform Manager command line interface user guide (AG781-96016, March 2009)

# cleanup after last run.
# (May also be set in a post-backup script.)
AllowExecErrors
UnmountVirtualDisk -VirtualDisk "FV1_v"
DeletePiTOrSnapshot -name "FV1_v", -TIMEOUT 900
DeletePiTOrSnapshot -name "FV1_f", -TIMEOUT 10800
DisallowExecErrors
# start actual work
OnErrorGoto ExitScript# --- Quiesce application (if applicable)
# --- Possibly: Flush OS cache - on App Server!
OnErrorGoto CleanPiT
CreatePiT -VirtualDisk "E2K_Store1", ~
-PiT "FV1_f", -TIMEOUT 900
# --- Resume application (if applicable)
OnErrorGoto CleanAll
CreateSnapshot -PiT "FV1_f", -snapshot "FV1_v", ~
-StoragePool "LogPool", -host "Backup_Server" RW , ~
-cluster 0, -TIMEOUT 900
MountVirtualDisk -MountPoint q:\, -VirtualDisk "FV1_v", ~
-Override
OnErrorGoto
Run -command YourBackupApplication.EXE
Quit
CleanAll:
AllowExecErrors
UnmountVirtualDisk -VirtualDisk "FV1_v"
DeletePiTOrSnapshot -name "FV1_v", -TIMEOUT 900
DeletePiTOrSnapshot -name "FV1_f", -TIMEOUT 10800
DisallowExecErrors
Quit
CleanPiT:
# --- Resume application (if applicable)
DeletePiTOrSnapshot -name "FV1_f", -TIMEOUT 10800
ExitScript:
Quit
Some backup applications execute backup tasks asynchronously. Consequently, the backed up virtual
disk or snapshot must remain alive until after the backup task is actually completed. This results in a
need for only one pre-backup script in most cases, that is invoked by the backup application before
it starts.
Alternatively, a CLI script can also do the whole task by activating the backup application from the
script itself (using the Run CLI command). A post-backup script (for clean up) may be invoked by the
backup application after task completion. If a post-backup script is not used, a PiT is maintained on
the original virtual disk until the next backup is performed.
In both cases, the pre-backup script must clean up before starting its actual work.
CLI command guidance
This section provides guidance that applies to all CLI commands. These examples are used for both
input from the command line or from an input file.
Square brackets ([…]) mean optional. The pipe symbol (|) means alternative.
The expression R|RW|OFF means that one of the alternatives (OFF, R, or RW) must appear in the
command where the expression appears.
The expression 0|1|...|N means that one of the alternatives (0,1,..., or N) must appear in the
command where the expression appears.
Using the VSM command line interface22