Chat now with support
Chat with Support

Rapid Recovery 6.1.2 - User Guide

Introduction to Rapid Recovery Core Console Core settings Repositories Encryption keys Protecting machines
About protecting machines with Rapid Recovery Support for dynamic and basic volumes Understanding the Rapid Recovery Agent software installer Deploying Agent to multiple machines simultaneously from the Core Console Using the Deploy Agent Software Wizard to deploy to one or more machines Modifying deploy settings Understanding protection schedules Protecting a machine About protecting multiple machines Settings and functions for protected Exchange servers Settings and functions for protected SQL servers
Managing protected machines Snapshots and recovery points Replication Events Reporting VM export Restoring data Bare metal restore
Bare metal restore for Windows machines Understanding boot CD creation for Windows machines Using the Universal Recovery Console for a BMR Performing a bare metal restore for Linux machines Viewing the recovery progress Starting a restored target server Troubleshooting connections to the Universal Recovery Console Repairing boot problems Performing a file system check on the restored volume
Managing aging data Archiving Cloud storage accounts The Local Mount Utility The Central Management Console Core Console references Command Line Management utility PowerShell module
Prerequisites for using PowerShell Working with commands and cmdlets Rapid Recovery PowerShell module cmdlets Localization Qualifiers
Scripting REST APIs About us Glossary

PreExportScript.ps1

The PreExportScript is run on the Core before any export job.

Sample PreExportScript

PostExportScript.ps1

The PostExportScript is run on the Core after any export job.

Sample PostExportScript

PreNightlyJobScript.ps1

The PreNightlyJobScript is run before every nighty job on Core side. It contains the parameter $JobClassName, which helps to handle those child jobs separately.

Sample PreNightlyJobScript

# receiving parameters from Nightlyjob
param([System.String]$JobClassMethod , [object]$NightlyAttachabilityJobRequest, [object]$RollupJobRequest, [object]$Agents, [object]$ChecksumCheckJobRequest, [object]$TransferJobRequest, [int]$LatestEpochSeenByCore)
# building path to Core's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery Core 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'CoreService\Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal) | out-null
# Nightlyjob has four child jobs: NightlyAttachability Job, Rollup Job, Checksum Check Job and Log Truncation Job. All of them are triggering the script, and $JobClassMethod (contain job name that calls the script) helps to handle those child jobs separately
switch ($JobClassMethod) {
# working with NightlyAttachability Job
NightlyAttachabilityJob {
$NightlyAttachabilityJobRequestObject = $NightlyAttachabilityJobRequest -as [Replay.Core.Contracts.Sql.NightlyAttachabilityJobRequest];
echo 'Nightly Attachability job results:';
if($NightlyAttachabilityJobRequestObject -eq $null) {
echo 'NightlyAttachabilityJobRequestObject parameter is null';
}
else {
echo 'AgentIds:' $NightlyAttachabilityJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $NightlyAttachabilityJobRequestObject.IsNightlyJob;
}
break;
}
# working with Rollup Job
RollupJob {
$RollupJobRequestObject = $RollupJobRequest -as [Replay.Core.Contracts.Rollup.RollupJobRequest];
echo 'Rollup job results:';
if($RollupJobRequestObject -eq $null) {
echo 'RollupJobRequestObject parameter is null';
}
else {
echo 'SimultaneousJobsCount:' $RollupJobRequestObject.SimultaneousJobsCount;
echo 'AgentIds:' $RollupJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $RollupJobRequestObject.IsNightlyJob;
}
$AgentsCollection = $Agents -as "System.Collections.Generic.List``1[System.Guid]"
if($AgentsCollection -eq $null) {
echo 'AgentsCollection parameter is null';
}
else {
echo 'Agents GUIDs:'
foreach ($a in $AgentsCollection) {
echo $a
}
}
break;
}
# working with Checksum Check Job
ChecksumCheckJob {
$ChecksumCheckJobRequestObject = $ChecksumCheckJobRequest -as [Replay.Core.Contracts.Exchange.ChecksumChecks.ChecksumCheckJobRequest];
echo 'Exchange checksumcheck job results:';
if($ChecksumCheckJobRequestObject -eq $null) {
echo 'ChecksumCheckJobRequestObject parameter is null';
}
else {
echo 'RecoveryPointId:' $ChecksumCheckJobRequestObject.RecoveryPointId;
echo 'AgentIds:' $ChecksumCheckJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $ChecksumCheckJobRequestObject.IsNightlyJob;
}
break;
}
# working with Log Truncation Job
TransferJob {
$TransferJobRequestObject = $TransferJobRequest -as [Replay.Core.Contracts.Transfer.TransferJobRequest];
echo 'Transfer job results:';
if($TransferJobRequestObject -eq $null) {
echo 'TransferJobRequestObject parameter is null';
}
else {
echo 'TransferConfiguration:' $TransferJobRequestObject.TransferConfiguration;
echo 'StorageConfiguration:' $TransferJobRequestObject.StorageConfiguration;
}
echo 'LatestEpochSeenByCore:' $LatestEpochSeenByCore;
break;
}
}

PostNightlyJobScript.ps1

The PostNightlyJobScript is run after every nighty job on the Core. It contains the parameter $JobClassName, which helps to handle those child jobs separately.

Sample PostNightlyJobScript

# receiving parameters from Nightlyjob
param([System.String]$JobClassMethod , [object]$NightlyAttachabilityJobRequest, [object]$RollupJobRequest, [object]$Agents, [object]$ChecksumCheckJobRequest, [object]$TransferJobRequest, [int]$LatestEpochSeenByCore, [object]$TakeSnapshotResponse)
# building path to Core's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery Core 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'CoreService\Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal) | out-null
$regVal2 = $regLM.GetValue('InstallLocation')
$regVal2= $regVal2 + 'CoreService\Core.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal2) | out-null
# Nightlyjob has four child jobs: NightlyAttachability Job, Rollup Job, Checksum Check Job and Log Truncation Job. All of them are triggering the script, and $JobClassMethod (contain job name that calls the script) helps to handle those child jobs separately
switch ($JobClassMethod) {
# working with NightlyAttachability Job
NightlyAttachabilityJob {
$NightlyAttachabilityJobRequestObject = $NightlyAttachabilityJobRequest -as [Replay.Core.Contracts.Sql.NightlyAttachabilityJobRequest];
echo 'Nightly Attachability job results:';
if($NightlyAttachabilityJobRequestObject -eq $null) {
echo 'NightlyAttachabilityJobRequestObject parameter is null';
}
else {
echo 'AgentIds:' $NightlyAttachabilityJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $NightlyAttachabilityJobRequestObject.IsNightlyJob;
}
break;
}
# working with Rollup Job
RollupJob {
$RollupJobRequestObject = $RollupJobRequest -as [Replay.Core.Contracts.Rollup.RollupJobRequest];
echo 'Rollup job results:';
if($RollupJobRequestObject -eq $null) {
echo 'RollupJobRequestObject parameter is null';
}
else {
echo 'AgentIds:' $RollupJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $RollupJobRequestObject.IsNightlyJob;
}
$AgentsCollection = $Agents -as "System.Collections.Generic.List``1[System.Guid]"
if($AgentsCollection -eq $null) {
echo 'AgentsCollection parameter is null';
}
else {
echo 'Agents GUIDs:'
foreach ($a in $AgentsCollection) {
echo $a
}
}
break;
}
# working with Checksum Check Job
ChecksumCheckJob {
$ChecksumCheckJobRequestObject = $ChecksumCheckJobRequest -as [Replay.Core.Contracts.Exchange.ChecksumChecks.ChecksumCheckJobRequest];
echo 'Exchange checksumcheck job results:';
if($ChecksumCheckJobRequestObject -eq $null) {
echo 'ChecksumCheckJobRequestObject parameter is null';
}
else {
echo 'RecoveryPointId:' $ChecksumCheckJobRequestObject.RecoveryPointId;
echo 'AgentIds:' $ChecksumCheckJobRequestObject.AgentIds;
echo 'IsNightlyJob:' $ChecksumCheckJobRequestObject.IsNightlyJob;
}
break;
}
# working with Log Truncation Job
TransferJob {
$TransferJobRequestObject = $TransferJobRequest -as [Replay.Core.Contracts.Transfer.TransferJobRequest];
echo 'Transfer job results:';
if($TransferJobRequestObject -eq $null) {
echo 'TransferJobRequestObject parameter is null';
}
else {
echo 'TransferConfiguration:' $TransferJobRequestObject.TransferConfiguration;
echo 'StorageConfiguration:' $TransferJobRequestObject.StorageConfiguration;
}
echo 'LatestEpochSeenByCore:' $LatestEpochSeenByCore;
$TakeSnapshotResponseObject = $TakeSnapshotResponse -as [Replay.Agent.Contracts.Transfer.TakeSnapshotResponse];
if($TakeSnapshotResponseObject -eq $null) {
echo 'TakeSnapshotResponseObject parameter is null';
}
else {
echo 'ID of this transfer session:' $TakeSnapshotResponseObject.SnapshotSetId;
echo 'Volumes:' $TakeSnapshotResponseObject.VolumeSnapshots;
}
break;
}
}
Related Documents