User guide
Scripting | 237
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.Id;
echo 'Volumes:' $TakeSnapshotResponseObject.Volumes;
}
break;
}
}
About Bourne Shell Scripting in AppAssure 5
Bourne shell (sh) or Bourne Again Shell (BASH) is a shell language or command-line
interpreter for Unix-based operating systems and is used in AppAssure 5 with Linux
to customize environments and specify certain operations to occur in a
predetermined sequence. The .sh is the file extension and naming convention for
Bourne shell files.
Using the pre and post transfer script hooks, you can perform system operations
before and after a transfer. For example, you may want to disable a certain cronjob
while a transfer is occurring and enable it once the transfer has finished. Another
example could include the need to execute commands to flush application specific
data to disk. The contents is written to a temporary file and executed using exec. This
will cause the script to be executed using the interpreter defined in the first line of
the script, for example, (#!/usr/bin/env bash) or the default shell as defined by the
$SHELL environment variable if that isn’t present. Depending on your preference,
you can substitute and use any interpreter, for example, zsh, tcsh, and so on in the
#! line of the script to use whatever their preference is, should it vary from the
default shell.