Sample hp replication solutions manager job – HP P6000 Continuous Access Software User Manual
Page 14

exec sp_helpdb TestDB3
testdb3_Data H:\SQLdata\testdb3_Data.MDF
testdb3_Log E:\SQLlogs\testdb3_Log.LDF
In this case, the logs files are all contained on the
E:
drive but the data files are spread across the
F:
,
G:
, and
H:
drives. A backup of this database requires snapshots or snapclones of
E:
,
F:
,
G:
,
and
H:
.
Constructing HP Replication Solutions Manager jobs or
Windows batch files
After you have created the
pre.bat
and
post.bat
files and determined the volumes to be replicated,
you can construct the HP Replication Solutions Manager jobs, or Windows batch files. The following
sample jobs are based on
Three SQL Server databases on a common set of volumes
, described in
the previous step. These samples use fully allocated snapshots. Depending on the storage array, other
replication methods can be used.
NOTE:
The following samples are for informational purposes and are not intended to be used as is.
Sample HP Replication Solutions Manager jobs using templates
Sample HP Replication Solutions Manager job
This sample job uses the
Replicate host volume(s), mount to a host
template. The
#
of volumes to replicate
was set to 4, and
Suspend source before replication
and
Launch backup after replication
were selected. The comments and Validation steps included
with this template were removed for clarity:
// Sample RSM job for Example 2
Launch ( "Server1", "pre.bat", "", WAIT, "0" ) onerror pauseat E1:
DO {
$Rep1 = SnapshotHostVolume ( "\\Server1\E:\", FULLY_ALLOCATED, SAME, NOWAIT ) onerror pauseat E1:
$Rep2 = SnapshotHostVolume ( "\\Server1\F:\", FULLY_ALLOCATED, SAME, NOWAIT ) onerror pauseat E2:
$Rep3 = SnapshotHostVolume ( "\\Server1\G:\", FULLY_ALLOCATED, SAME, NOWAIT ) onerror pauseat E3:
$Rep4 = SnapshotHostVolume ( "\\Server1\H:\", FULLY_ALLOCATED, SAME, NOWAIT ) onerror pauseat E4:
} ALWAYS {
Launch ( "Server1", "post.bat", "", WAIT, "0" )
}
WaitForStorageVolumesDiscovery ( $Rep1 ) onerror pauseat E5:
WaitForStorageVolumesDiscovery ( $Rep2 ) onerror pauseat E5:
WaitForStorageVolumesDiscovery ( $Rep3 ) onerror pauseat E5:
WaitForStorageVolumesDiscovery ( $Rep4 ) onerror pauseat E5:
$HV1 = CreateHostVolume ( "\\Server1\E:\", $Rep1, "Backup-Server" ) onerror pauseat E5:
$HV2 = CreateHostVolume ( "\\Server1\F:\", $Rep2, "Backup-Server" ) onerror pauseat E6:
$HV3 = CreateHostVolume ( "\\Server1\G:\", $Rep3, "Backup-Server" ) onerror pauseat E7:
$HV4 = CreateHostVolume ( "\\Server1\H:\", $Rep4, "Backup-Server" ) onerror pauseat E8:
$MP1 = MountHostVolume ( $HV1, "L:" ) onerror pauseat E9:
$MP2 = MountHostVolume ( $HV2, "M:" ) onerror pauseat E10:
$MP3 = MountHostVolume ( $HV3, "N:" ) onerror pauseat E11:
$MP4 = MountHostVolume ( $HV4, "O:" ) onerror pauseat E12:
Launch ( "Backup-Server", "backup.bat", "", WAIT, "0" ) onerror pauseat E13:
Pause ( )
//Unwind section
E13: UnmountHostVolume ( $MP4 ) onerror pauseat E12:
E12: UnmountHostVolume ( $MP3 ) onerror pauseat E11:
E11: UnmountHostVolume ( $MP2 ) onerror pauseat E10:
E10: UnmountHostVolume ( $MP1 ) onerror pauseat E9:
E9: DeleteHostVolume ( $HV4 ) onerror pauseat E9:
E8: DeleteHostVolume ( $HV3 ) onerror pauseat E8:
Creating snapshot backups using HP DButil
14