Help Center
Choose product document...
Veeam Backup & Replication 9.5
PowerShell Reference

Add-VBRHvReplicaJob

Short Description

Creates Hyper-V replication jobs.

Applies to

Platform: Hyper-V

For VMware, run Add-VBRViReplicaJob.

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Add-VBRHvReplicaJob -Server <CHost> -Entity <IHvItem[]> [-Name <string>] [-Path <string>] [-Suffix <string>] [-Description <string>] [-SourceRepository <CBackupRepository[]>] [-BackupRepository <CBackupRepository>] [-ReIpRule <VBRHvReplicaReIpRule[]>] [-RepositorySeed <CBackupRepository>] [-OriginalVM <CHvVmItem[]>] [-ReplicaVM <CHvVmItem[]>]  [<CommonParameters>]

Detailed Description

This cmdlet creates a new Hyper-V replication job.

You can select a data source from which VM data must be read:

  • Actual VM: Veeam Backup & Replication will copy an actual VM from production storage. The created replica will mirror an actual VM state.

Use the Entity parameter to indicate the VMs you want to replicate.

  • Replica from backup files: Veeam Backup & Replication will build a replica from backup files stored on a backup repository. The created replica will be in the latest state the VM is available in backups.

Use the Entity parameter to indicate the VMs you want to replicate and the BackupRepository parameter to set the repository from where the backup files must be read.

Note that when you create a replica job, you need to run it manually unless you enable a job schedule.

Run Start-VBRJob to start the created job manually.

Run Set-VBRJobSchedule to set schedule for the job and run it automatically.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Name

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

False

Named

False

False

Server

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

True

Named

False

False

Path

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

True

Named

False

False

Entity

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

True

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

Source
Repository

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

Backup
Repository

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

Default: default backup repository.

False

Named

False

False

ReIpRule

Specifies the re-IP rules.

Accepts VBRHvReplicaReIpRule type.

False

Named

False

False

RepositorySeed

For replica seeding.

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

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

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Example 1

This command creates a VM replica from a production storage.

  1. Run Find-VBRHvEntity to get the VM you want to replicate. Save it to the $entity variable.
  2. Run Get-VBRServer to get the server, where you want to locate the replica. Save it to the $targetserver variable.
  3. Run Add-VBRHvReplicaJob. Use the $entity and $targetserver variables.

PS C:\PS> $entity = Find-VBRHvEntity -Name "sql02"

PS C:\PS> $targetserver = Get-VBRServer -Type HvServer -Name "Hv_Server"

PS C:\PS> Add-VBRHvReplicaJob -Name "SQL02 Replica job" -Entity $entity -Server $targetserver -Path "c:\Replicas" -Suffix "_replicated" -Description "SQL02 replication"

Example 2

This command creates a VM replica from backup files.

  1. Run Find-VBRHvEntity to get the VM you want to replicate. Save it to the '$sql02' variable.
  2. Run Get-VBRServer to get the server, where you want to locate the replica. Save it to the $targetserver variable.
  3. Run Get-VBRBackupRepository to get the repository where the backup files for the replica reside. Save it to the $repository variable.

PS C:\PS> $entity = Find-VBRHvEntity -Name "HvExchange"

PS C:\PS> $targetserver = Get-VBRServer -Type HvServer -Name "Hv_Server"

PS C:\PS> Add-VBRHvReplicaJob -Name "SQL02 Replica job" -Server $targetserver -Path "c:\Replicas" -Entity $sql02 -Description "SQL02 replication" -SourceRepository $repository

Related Commands

Get-VBRServer

Find-VBRHvEntity

Get-VBRBackupRepository

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation