Cmdlets > Add-DtUvraPhysicalRule

Add-DtUvraPhysicalRule

Adds a physical rule to a workload

Syntax

Add-DtUvraPhysicalRule [-ServiceHost] <Server> [-Workload] <Workload> -Path <String> [-Recurse] [-Exclude] [<CommonParameters>]

 

Add-DtUvraPhysicalRule [-ServiceHost] <Server> [-Workload] <Workload> [-Rule] <PhysicalRule> [<CommonParameters>]

Detailed Description

This cmdlet adds a physical rule to the specified full server to ESX appliance workload on the specified server.

Parameters

Name Type Description Required Pipeline Input
Service
Host
Server

Specify the server object returned from the New-DtUvraServer cmdlet. For this cmdlet, the -ServiceHost should be your source server.

true false
Workload

Workload

Specify the workload object returned from the Get-DtWorkload cmdlet.

true false
Path String

Specify the path on the source that contains the data that you want to protect

true false
Recurse Switch
Parameter

Apply the rule to the subdirectories of the specified path. If you do not specify this option, the subdirectories of the specified path will not be included/excluded.

false false
Exclude Switch
Parameter

Exclude the specified path from mirroring and replication. If you do not specify this option, the path will be included for mirroring and replication.

false false
Rule PhysicalRule

Use the Windows PowerShell New-Object cmdlet to create a physical rule object from DoubleTake.Common.Contract.PhysicalRule.

true false

Outputs

Workload

Examples

$DtServerObjectAlpha= New-DtUvraServer -Name alpha -UserName domain\administrator -Password password -Port 6325

$DtApplianceObject = New-DtUvraServer -Name beta -UserName root -Password password -Port 6325

$DtApplianceHost = New-DtUvraServer -Name gamma -UserName root -Password password

$DtWorkloadGuid = New-DtWorkload -ServiceHost $DtServerObjectAlpha -WorkloadTypeName Lvra

$DtWorkload = Get-DtWorkload -ServiceHost $DtServerObjectAlpha -WorkloadId $DtWorkloadGuid

$DtRecommendedJobOptions = Get-DtRecommendedJobOptions -ServiceHost $DtApplianceObject -Source $DtServerObjectAlpha -JobType Lvra -Workload $DtWorkload

Add-DtUvraPhysicalRule -ServiceHost $DtApplianceObject -Workload $DtRecommendedJobOptions.JobOptions.Workload -Path "/home"

Disconnect-DtServer -ServiceHost $DtServerObjectAlpha

Disconnect-DtServer -ServiceHost $DtApplianceObject

Disconnect-DtServer -ServiceHost $DtApplianceHost

Three server objects are created for the source, the appliance, and the ESX server hosting the appliance, assigning the server objects to the DtServerObjectAlpha, DtApplianceObject, and DtApplianceHost variables, respectively. Then proxy and host information is retrieved for those server objects, storing the information in DtProxyInfo and DtVmHostInfo, respectively. That information is then used to retrieve the recommended job options. A rule for the path C:\Documents and Settings is added to the recommended job options. The connections for the server object are then closed.