Add-VBRHvBackupCopyJob
Short Description
Creates a Hyper-V backup copy job.
Applies to
Platform: Hyper-V
For VMware, run Add-VBRViBackupCopyJob.
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
- For data transfer with WAN accelerators:
Add-VBRHvBackupCopyJob -SourceAccelerator <CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name <string>] [-Description <string>] [-Entity <IHvItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] [-Force] [-EnableImmediateCopy] [<CommonParameters>] |
- For direct data transfer:
Add-VBRHvBackupCopyJob -DirectOperation [-Name <string>] [-Description <string>] [-Entity <IHvItem[]>] [-Backup <CBackup[]>] [-BackupJob <CBackupJob[]>] [-Repository <CBackupRepository>] [-Force] [-EnableImmediateCopy] [<CommonParameters>] |
Detailed Description
This cmdlet creates a new Hyper-V backup copy job.
You can use VMs, backups or backup jobs as a source for the backup copy job. Veeam will use this data to copy the backups of the needed VMs.
You can transfer data in the following ways:
- Using WAN accelerators. This mode is recommended for off-site backups.
To create and run a backup copy job using WAN accelerators you need to have source and target WAN accelerators created. Run Add-VBRWANAccelerator to create a WAN accelerator. WAN optimization is available only in Veeam Backup & Replication Enterprise Plus Edition.
- Directly. With this method, the job sends the data directly to the target backup repository without performing data deduplication. This mode is recommended for on-site backups, or off-site backups using fast connections.
Use an appropriate parameter set for each way.
Note that the backup copy job is created in disabled state. Run Enable-VBRJob to start the job running on the defined schedule.
Starting from Veeam Backup & Replication version 9.5 Update 3, the cmdlet checks if the data of the VMs added to the job changes its geographical location.
|
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 | Accept |
SourceAccelerator | Specifies the WAN accelerator on the source side. Remember to set the pair of source and target WAN accelerators. | True | Named | False | False |
TargetAccelerator | Specifies the WAN accelerator on the target side. Remember to set the pair of source and target WAN accelerators. | True | Named | False | False |
DirectOperation | Enables direct operation method sending the data directly to the target backup repository without performing data deduplication. | True | Named | False | False |
Name | Specifies the name you want to assign to the backup copy job. | False | Named | False | False |
Entity | Specifies the array of VMs you want to add to the backup copy job. NOTE: You can create a job without source and link it to a backup job after. | False | Named | True (ByValue, | False |
Backup | Specifies the array of backups. The cmdlet will add VMs from these backups to the backup copy job. | False | Named | False | False |
BackupJob | Specifies the array of backup jobs. The cmdlet will add VMs processed by these jobs to the backup copy job. | False | Named | False | False |
Repository | Specifies the backup repository to where you want to copy the VM data. Default: default backup repository. | False | Named | False | False |
Description | Specifies the description of the backup copy job. | False | Named | False | False |
Force | Indicates that the cmdlet will create a job even if the geographical location of the VMs added to the job and the target backup repository location do not match. | False | Named | False | False |
EnableImmediateCopy | Defines that the cmdlet will enable the immediate copy mode. If you specify this parameter, Veeam Backup & Replication will copy new restore points and logs as soon as they appear. Otherwise, Veeam Backup & Replication will copy data from backups once per backup copy interval. | 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 command creates a backup copy job that will use WAN accelerators:
- The source and target WAN accelerators are obtained with Get-VBRWANAccelerator and assigned to $wansource and $wantarget variables accordingly beforehand.
- The VMs to copy are obtained with Find-VBRHvEntity and assigned to the $vms variable beforehand.
- The repository to where the VM data will be copied is obtained with Get-VBRBackupRepository and assigned to the $repository variable beforehand.
Add-VBRHvBackupCopyJob -SourceAccelerator $wansource -TargetAccelerator $wantarget -Name CopyJob1 -Entity $vms -Repository $repository |
Example 2
This command creates a direct backup copy job that will copy backups to the default backup repository:
- The name of the job is "DC CopyJob".
- The backup job named "DC Backup" with the VMs to be copied is obtained with Get-VBRBackup and piped down.
- The Repository parameter is omitted.
Related Commands