Add-VBRViReplicaJob
Short Description
Creates VMware replication jobs.
Platform: VMware
For Hyper-V, run the Add-VBRHvReplicaJobCreates Hyper-V replication jobs. cmdlet.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Add-VBRViReplicaJob [-Name <String>] -Server <Object> -Entity <IViItem[]> [-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 <Int32>] [-SourceRepository <CBackupRepository[]>] [-ReIpRule <IViReIpRule[]>] [-DiskType <EDiskCreationMode>] [-RepositorySeed <CBackupRepository>] [-OriginalVM <CViVmItem[]>] [-ReplicaVM <CViVmItem[]>] [-Force] [-HighPriority] [-Multitag] [<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
Entityparameter to indicate the VMs you want to replicate. - Replica from backup files: Veeam Backup & Replication will build a replica from backup files stored in a backup repository. The created replica will be in the latest state the VM is available in backups.
Use the
Entityparameter to indicate the VMs you want to replicate and theSourceRepositoryparameter 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
StoragePolicyparameter to set the profile. - Network mapping: this option allows you to configure network mapping rules if the production site and DR site use separate virtual networks. Use the
EnableNetworkMappingparameter to enable the network mapping and theSourceNetworkand theTargetNetworkparameters to select the networks. - Proxy servers: this option allows you to configure particular proxy servers for the data transfer. Use the
SourceProxyand theTargetProxyparameters to set the proxies. - WAN accelerators: this option allows you to use the built-in WAN accelerators to optimize the data transfer. Use the
SourceWANAcceleratorand theTargetWANAcceleratorparameters to set the WAN accelerators. Note that WAN acceleration is available only in the Enterprise Plus, Veeam Universal License edition. - Re-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 beforehand by running the
New-VBRViReplicaReIpRuleCreates a new VMware replica re-IPv4 rule. orNew-VBRViReplicaReIpIPv6RuleCreates a new VMware replica re-IPv6 rule. cmdlet. Pass the created object to theReIpRuleparameter of this cmdlet.
Note that when you create a replica job, you need to run it manually unless you enable a job schedule.
Run the Start-VBRJobStarts a backup or replication job. cmdlet to run the job manually.
Run the Set-VBRJobScheduleModifies job schedule. cmdlet to set the schedule for the job and run it automatically.
Note |
|
The cmdlet will not run if the geographic 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 |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
BackupRepository |
Specifies the backup repository that will be used to store replica metadata files. Default: default backup repository.
Accepts the |
|
False |
Named |
False |
|
Datastore |
Specifies the datastore to which you want to replicate.
Accepts the |
|
False |
Named |
False |
|
Description |
Specifies the description of the new job. |
|
False |
Named |
False |
|
DiskType |
Specifies the format that will be used to restore replica disk files:
Default: |
|
False |
Named |
False |
|
EnableNetworkMapping |
Enables network mapping. Use the |
|
False |
Named |
False |
|
Entity |
Specifies the array of VMs you want to add to this job.
Accepts the |
|
True |
Named |
True (ByPropertyName, ByValue) |
|
Folder |
Specifies the folder to which you want to replicate.
Accepts the |
|
False |
Named |
False |
|
Force |
Defines that the cmdlet will create a job even if the geographic location of the VMs added to the job and the target host location do not match. |
|
False |
Named |
False |
|
HighPriority |
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 |
|
Multitag |
Defines that the cmdlet will replicate tags. |
|
False |
Named |
False |
|
Name |
Specifies the name you want to assign to the replication job. |
|
False |
Named |
False |
|
OriginalVM |
For replica mapping. Specifies a production VM you want to replicate using replica mapping. The replication job will map this VM to a selected replica VM on the disaster recovery site.
Use the
Accepts the |
|
False |
Named |
False |
|
ReIpRule |
Specifies the re-IP rules.
Accepts the |
|
False |
Named |
False |
|
ReplicaVM |
For replica mapping. Specifies a VM on the disaster recovery site. The cmdlet will map the production VM to this VM, and the replication job will replicate data to this VM.
Use the
Accepts the |
|
False |
Named |
False |
|
RepositorySeed |
For replica seeding. Specifies the backup repository where the seed (the full backup) resides.
Accepts the |
|
False |
Named |
False |
|
ResourcePool |
Specifies the resource pool to which you want to replicate.
Accepts the |
|
False |
Named |
False |
|
RestorePointsToKeep |
Specifies the number of restore points you want to keep.
Permitted values:
Default: |
|
False |
Named |
False |
|
Server |
Specifies the target VMware host where the created replica will be stored.
Accepts the |
|
True |
Named |
False |
|
SourceNetwork |
For network mapping. Specifies the array of production networks to which the VMs in the job are connected. Note: The number of the source and the target networks must be the same.
Accepts the |
False |
Named |
False |
|
|
SourceProxy |
Specifies the source proxy that you want to assign to the job. Default: Automatic selection.
Accepts the |
|
False |
Named |
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.
Accepts the |
|
False |
Named |
False |
|
SourceWANAccelerator |
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.
Accepts the |
False |
Named |
False |
|
|
StoragePolicy |
Specifies the VMware storage policy profile that must be applied to the replica virtual disks.
Accepts the |
False |
Named |
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 |
|
TargetNetwork |
For network mapping. Specifies the array of networks in the disaster recovery site. The replicated VMs will be connected to these networks. Note: The number of the source and the target networks must be the same.
Accepts the |
False |
Named |
False |
|
|
TargetProxy |
Specifies the target proxy that you want to assign to the job. Default: Automatic selection.
Accepts the |
|
False |
Named |
False |
|
TargetWANAccelerator |
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.
Accepts the |
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
CBackupJob
Examples
Creating Replication Job
This example shows how to create a replication job.
|
$server = Get-VBRServer -Name "DR Host" $vm = Find-VBRViEntity -Server $server -Name "DC" $pool = Find-VBRViResourcePool -Server "DR Host" -Name "ResourcePool_05" $datastore = Find-VBRViDatastore -Server "DR Host" -Name "LocalStore" Add-VBRViReplicaJob -Name "DC Replication Job" -Server $server -Entity $vm -ResourcePool $pool -Datastore $datastore -Suffix "_replicated" |
Perform the following steps:
- Run the
Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify theNameparameter value. Save the result to the$servervariable. - Run the
Find-VBRViEntityLooks for VMware objects. cmdlet. Set the$servervariable as theServerparameter value. Specify theNameparameter value. Save the result to the$vmvariable. - Run the
Find-VBRViResourcePoolReturns VMware resource pools. cmdlet. Specify theServerandNameparameter values. Save the result to the$poolvariable. - Run the
Find-VBRViDatastoreLooks for VMware datastores. cmdlet. Specify theServerandNameparameter values. Save the result to the$datastorevariable. - Run the
Add-VBRViReplicaJobcmdlet. Specify the following settings:- Specify the
Nameparameter value. - Set the
$servervariable as theServerparameter value. - Set the
$vmvariable as theEntityparameter value. - Set the
$poolvariable as theResourcePoolparameter value. - Set the
$datastorevariable as theDatastoreparameter value. - Specify the
Suffixparameter value.
- Specify the
Related Commands
Get-VBRServerReturns hosts connected to the backup infrastructure.Find-VBRViEntityLooks for VMware objects.Find-VBRViDatastoreLooks for VMware datastores.Find-VBRViStoragePolicyLooks for VMware storage policy profiles.Find-VBRViResourcePoolReturns VMware resource pools.Find-VBRViFolderLooks for folders on a specified ESXi host.Get-VBRBackupRepositoryReturns a list of backup repositories.Get-VBRViServerNetworkInfoReturns virtual networks for a VMware host.Get-VBRViProxyReturns a list of VMware backup proxies.Get-VBRWANAcceleratorReturns WAN accelerators.New-VBRViReplicaReIpRuleCreates a new VMware replica re-IPv4 rule.Get-VBRLocationReturns geographic locations created in Veeam Backup & Replication.