This is an archive version of the document. To get the most up-to-date information, see the current version.

Set-VBRHvReplicaJob

Short Description

Modifies Hyper-V replication jobs.

Applies to

Platform: Hyper-V

For VMware, run Set-VBRViReplicaJob.

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Set-VBRHvReplicaJob -Job <CBackupJob> [-Name <string>] [-Server <CHost>] [-Path <string>] [-Entity <IHvItem[]>] [-Suffix <string>] [-Description <string>] [-SourceRepository <CBackupRepository[]>] [-BackupRepository <CBackupRepository>] [-EnableReIp] [-ReIpRule <VBRHvReplicaReIpRule[]>] [-EnableSeeding] [-RepositorySeed <CBackupRepository>] [-EnableVMMapping] [-OriginalVM <CHvVmItem[]>] [-ReplicaVM <CHvVmItem[]>] [-Force] [-HighPriority][<CommonParameters>]

Detailed Description

This cmdlet modifies an existing Hyper-V replication job. To modify settings, you need to specify new values for the necessary parameters. The parameters that you omit will remain unchanged.

Note

The cmdlet will not run if the geographical location of the VMs added to the job and the job target repository location do not match. If you still want to run the cmdlet, use the Force parameter.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Job

Specifies the replication job you want to modify.

True

Named

True (ByValue,
ByProperty
Name)

False

Name

Specifies the name you want to assign to the replication job.

False

Named

False

False

Server

Specifies the Hyper-V host where the created replica will be stored.

False

Named

False

False

Path

Specifies the Hyper-V volume where the created replica will be stored.

False

Named

False

False

Entity

Specifies the array of  VMs you want to add to this job.

False

Named

True (ByValue,
ByProperty
Name)

False

Suffix

Specifies the suffix that will be appended to the name of the VM you are replicating. This name will be used to register the replicated VM on the target server.

Default: "_replica".

False

Named

False

False

Description

Specifies the description of the replication job.

False

Named

False

False

SourceRepository

For building replica from backup files.

Specifies the backup repository that will be used to read the VM data from the already existing backup chain.

You cannot specify cloud repository.

False

Named

False

False

BackupRepository

Specifies the backup repository that will be used to store replica metadata files.

Default: default backup repository.

False

Named

False

False

EnableReIp

Indicates that the re-IP rules must be used. Use the ReIpRule parameter to set the re-IP rules.

False

Named

False

False

ReIpRule

Specifies the re-IP rules.

Accepts VBRHvReplicaReIpRule type.

False

Named

False

False

EnableSeeding

Indicates that the replication job will use seeding.

False

Named

False

False

RepositorySeed

For replica seeding.

Specifies the backup repository where the seed (the full backup) resides.

False

Named

False

False

EnableVMMapping

Indicates that the replication job will use replica mapping.

False

Named

False

False

OriginalVM

For replica mapping.

Specifies the production VM you want to replicate using replica mapping.

The replication job will map this VM to a selected replica VM on the DR site.

Use the ReplicaVM parameter to specify the replica VM on the DR site.

False

Named

False

False

ReplicaVM

For replica mapping.

Specifies the VM on the DR site you want to use as the replication target. The replication job will map the production VM to this VM.

Use the OriginalVM parameter to specify the production VM.

False

Named

False

False

Force

Indicates that the cmdlet will modify the job even if the geographical location of the VMs added to the job and the target host location do not match.

False

Named

False

False

HighPriority

Note: This parameter is available starting from Veeam Backup & Replication 11a (build 11.0.1.1261).

Defines that Veeam Backup & Replication will prioritize this job higher than other similar jobs and will allocate resources to it in the first place.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Example 1

This example shows how to configure a re-IP rule for a replication job.

You will need to perform the following steps:

  1. Run Get-VBRJob to get the replication job and save it to the $job variable.
  2. Run New-VBRHvReplicaReIpRule to create a new re-IP rule. Save it to the $reiprule variable.
  3. Run Set-VBRHvReplicaJob. Use the $job and $reiprule variables.

$job = Get-VBRJob -Name "Hawk Replication"

$reiprule = New-VBRHvReplicaReIpRule -SourceIp 172.16.*.* -SourceMask 255.255.0.0 -TargetIp 172.17.*.* -TargetMask 255.255.0.0 -TargetGateway 172.17.0.1

Set-VBRHvReplicaJob -Job $job -EnableReIp -ReIpRule $reiprule

Example 2

This example shows how to configure seeding for a replication job.

You will need to perform the following steps:

  1. Run Get-VBRJob to get the replication job and save it to the $job variable.
  2. Run Get-VBRBackupRepository to get the backup repository where the seed backup resides and save it to the $repository variable.
  3. Run Set-VBRHvReplicaJob with the $job and $repository variables.

$job = Get-VBRJob -Name "Hawk Replication"

$repository = Get-VBRBackupRepository -Name "Backup Volume 01"

Set-VBRHvReplicaJob -Job $job -EnableSeeding -RepositorySeed $repository

Example 3

This example shows how to configure VM mapping for a replication job.

You will need to perform the following steps:

  1. Run Get-VBRJob to get the replication job and save it to the $job variable.
  2. Run Find-VBRHvEntity to get the original VM that you want to map. Save it to the $originalvm variable.
  3. Run Find-VBRHvEntity to get the replica VM. Save it to the $replicavm variable.
  4. Run Set-VBRHvReplicaJob. Use the $job, $originalvm and $replicavm variables.

$job = Get-VBRJob -Name "Hawk Replication"

$originalvm = Find-VBRHvEntity -Server "Production Host" -Name "Original VM"

$replicavm = Find-VBRHvEntity -Server "DR Host" -Name "Replica VM"

Set-VBRHvReplicaJob -Job $job -EnableVMMapping -OriginalVM $originalvm -ReplicaVM $replicavm

Related Commands

Get-VBRJob

Get-VBRServer

Find-VBRHvEntity

Get-VBRBackupRepository

New-VBRHvReplicaReIpRule

Get-VBRReplica

Get-VBRLocation