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

Add-VBRViReplicaJob

Short Description

Creates VMware replication jobs.

Applies to

Platform: VMware

For Hyper-V, run Add-VBRHvReplicaJob.

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Add-VBRViReplicaJob -Server <Object> -Entity <IViItem[]> [-Name <string>] [-Datastore <VBRViDatastoreBase>] [-StoragePolicy <VBRViStoragePolicy>] [-ResourcePool <CViResourcePoolItem>] [-Folder <CViFolderItem>] [-Suffix <string>] [-BackupRepository <CBackupRepository>] [-Description <string>] [-EnableNetworkMapping] [-SourceNetwork <VBRViNetworkInfo[]>] [-TargetNetwork <VBRViNetworkInfo[]>] [-SourceProxy <CViProxy[]>] [-TargetProxy <CViProxy[]>] [-SourceWANAccelerator <CWanAccelerator>] [-TargetWANAccelerator <CWanAccelerator>] [-RestorePointsToKeep <int>] [-SourceRepository <CBackupRepository[]>] [-ReIpRule <VBRViReplicaReIpRule[]>] [-DiskType <EDiskCreationMode> {Source | Thick | Thin | ThickEagerZeroed}] [-RepositorySeed <CBackupRepository>] [-OriginalVM <CViVmItem[]>] [-ReplicaVM <CViVmItem[]>]  [<CommonParameters>]

Detailed Description

This cmdlet creates a new VMware 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 SourceRepository parameter to set the repository from where the backup files must be read.

When you create a replication job, you can configure the following additional settings:

  • Storage policy profile: you can apply a particular VMware storage policy profile to virtual disks of the replica VM. Use the StoragePolicy parameter to set the profile.
  • Network mapping: this option allows you to configure network mapping rules if the production site and DR site uses separate virtual networks. Use the EnableNetworkMapping parameter to enable the network mapping and the SourceNetwork and the TargetNetwork parameters to select the networks.
  • Proxy servers: this options allow you to configure particular proxy servers for the data transfer. Use the SourceProxy and the TargetProxy parameters to set the proxies.
  • WAN accelerators: this options allow you to use the built-in WAN accelerators to optimize the data transfer. Use the SourceWANAccelerator and the TargetWANAccelerator parameters to set the WAN accelerators. Note that WAN acceleration is available only in the Enterprise Plus edition.
  • Ri-IP rules: this option allows you to configure different IP addressing scheme for the production and the DR sites. You need to create an object containing the re-IP rules before hand by running New-VBRViReplicaReIpRule. Pass the created object to the ReIpRule parameter of this cmdlet.

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 VMware host where the created replica will be stored.

Accepts CHost (standalone host) or CViClusterItem (cluster) type.

True

Named

False

False

Entity

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

True

Named

True (ByValue,
ByProperty
Name)

False

Datastore

Specifies the datastore to which you want to replicate.

False

Named

False

False

Storage
Policy

Specifies the VMware storage policy profile that must be applied to the replica virtual disks.

Accepts VBRViStoragePolicy type.

False

Named

False

False

Resource
Pool

Specifies the resource pool to which you want to replicate.

False

Named

False

False

Folder

Specifies the folder to which you want to replicate.

False

Named

False

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

Backup
Repository

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

Default: default backup repository.

False

Named

False

False

Description

Specifies the description of the new job.

False

Named

False

False

Enable
Network
Mapping

Indicates that the network mapping must be used. Use the SourceNetwork and the TargetNetwork parameters to set the network mapping rules.

False

Named

False

False

Source
Network

For network mapping.

Specifies the array of production networks to which the VMs in the job are connected.

Accepts VBRViNetworkInfo type.

NOTE: the number of the source and the target networks must be the same.

False

Named

False

False

Target
Network

For network mapping.

Specifies the array of networks in the DR site. The replicated VMs will be connected to these networks.

Accepts VBRViNetworkInfo type.

NOTE: the number of the source and the target networks must be the same.

False

Named

False

False

Source
Proxy

Specifies the source proxy you want to assign to the job.

Default: automatic selection.

False

Named

False

False

Target
Proxy

Specifies the target proxy you want to assign to the job.

Default: automatic selection.

False

Named

False

False

Source
WAN
Accelerator

Specifies the WAN accelerator configured in the source site that will be used for data transfer.

Remember to set the pair of source and target WAN accelerators.

Default: not set.

False

Named

False

False

Target
WAN
Accelerator

Specifies the WAN accelerator configured in the target site that will be used for data transfer.

Remember to set the pair of source and target WAN accelerators.

Default: not set.

False

Named

False

False

Restore
Points
ToKeep

Specifies the number of restore points you want to keep.

Permitted values: 1 to 28.

Default: 7.

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.

False

Named

False

False

ReIpRule

Specifies the re-IP rules.

Accepts VBRViReplicaReIpRule type.

False

Named

False

False

DiskType

Specifies the format that will be used to restore replica disk files:

  • Source: the restored replica disks will be the same format as source.
  • Thick: the restored replica disks will be thick.
  • Thin: the restored replica disks will be thick.

Default: Source.

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

This command creates a replication job.

  1. Run Get-VBRServer to get the server where you want to locate the replica. Save it to the $server variable.
  2. Run Find-VBRViEntity to get the VM you want to replicate. Save it to the $vm variable.
  3. Run Find-VBRViResourcePool and Find-VBRViDatastore to get the resource pool and datastore for the replica. Save it to the $pool and $datastore variables accordingly.
  4. Run Add-VBRViReplicaJob. Use the $vm, $server, $pool and $datastore variables.

PS C:\PS> $server = Get-VBRServer -Name "DR Host"

PS C:\PS> $vm = Find-VBRViEntity -Server $server -Name "DC"

PS C:\PS> $pool = Find-VBRViResourcePool -Server "DR Host" -Name "ResourcePool_05"

PS C:\PS> $datastore = Find-VBRViDatastore -Server "DR Host" -Name "LocalStore"

PS C:\PS> Add-VBRViReplicaJob -Name "DC Replication Job" -Server $server -Entity $vm -ResourcePool $pool -Datastore $datastore -Suffix "_replicated"

Related Commands

Get-VBRServer

Find-VBRViEntity

Find-VBRViDatastore

Find-VBRViStoragePolicy

Find-VBRViResourcePool

Find-VBRViFolder

Get-VBRBackupRepository

Get-VBRViServerNetworkInfo

Get-VBRViProxy

Get-VBRWANAccelerator

New-VBRViReplicaReIpRule

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 Endpoint Backup Documentation

Veeam Management Pack Documentation