Add-VBRCopyJob

Short Description

Creates VM and file copy jobs.

Applies to

Platform: VMware

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

Syntax

This cmdlet provides parameter sets that allow you to:

  • Create a file copy job.

Add-VBRCopyJob -Name <string> -Type <ESourceType> {NET | VCB | VDDK | Files | HyperV | Backup | Unknown} -Server <CHost> -Folder <string> -SourceServer <CHost> -Objects <string[]> [-FileName <string>] [-Description <string>] [-Force]  [<CommonParameters>]

  • Create a VM copy job.

Add-VBRCopyJob -Name <string> -Type <ESourceType> {NET | VCB | VDDK | Files | HyperV | Backup | Unknown} -Objects <string[]> -Repository <CBackupRepository> [-FileName <string>] [-Description <string>] [-Force]  [<CommonParameters>]

Detailed Description

This cmdlet creates a new job that copies the selected VMs to another location.

With a VM copy job, you can create a fully-functioning copy of a VM that will require no manual editing and adjustments. VM copying can be helpful if you want to move your datacenter, mirror your production environment to test lab storage, etc.

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

Run the Start-VBRJob cmdlet to start the created job.

Run the Set-VBRJobSchedule cmdlet to set schedule for the job.

Run the Copy-VBRJob cmdlet to create a copy of a job.

Note:

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

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Name

Specifies the name you want to assign to the new copy job.

String

True

1

False

Type

Specifies the string with the type of the created copy job which defines how VM data is retrieved:

  • VDDK - Virtual Disk Development Kit (VMware vStorage API): used for VM backup jobs data.
  • Files: used for file backup data.
  • Backup: not supported (legacy mode).
  • Hyper-V: not supported (legacy mode).
  • VCB: not supported (legacy mode).
  • NET: not supported (legacy mode).

ESourceType

True

2

False

Server

Specifies the host where the created copy should be stored.

Accepts the CHost object. To get this object, run the Get-VBRServer cmdlet.

True

Named

False

Folder

Specifies the string with full path to the folder where the created VM copy should be stored.

String

True

Named

False

FileName

Specifies the string with the file name for the created VM copy (by default, a copied file is given the same name as the VM).

String

False

Named

False

SourceServer

Specifies the server where the target files for file copy job are located.

Accepts the CHost or string (host name) object. To get this object, run the Get-VBRServer cmdlet.

True

Named

False

Objects

Specifies an array of names for VMs that you want to copy.

String[]

True

Named

True (ByValue,
ByProperty
Name)

Description

Specifies the description of the copy job.

String

False

Named

False

Repository

Specifies the backup repository to which you want to place the copied VMs.

You cannot use scale-out backup repository as target to the VM copy job.

Accepts the CBackupRepository object. To get this object, run the Get-VBRBackupRepository cmdlet.

True

Named

False

Force

Defines that the cmdlet will create a VM copy job even if the geographic location of the VMs added to the job and the target host location do not match.

SwitchParameter

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 VM Copy Job

This example shows how to create a VM copy job.

$machine = Find-VBRViEntity -Name "Serv49"

$repository = Get-VBRBackupRepository

Add-VBRCopyJob -Name "Copy02" -Type VDDK -Objects $machine -Repository $repository

Perform the following steps:

  1. Run the Find-VBRViEntity cmdlet. Specify the Name parameter value. Save the result to the $machine variable.
  2. Run the Get-VBRBackupRepository cmdlet. Save the result to the $repository variable.
  3. Run the Add-VBRCopyJob cmdlet. Specify the following settings:
  • Specify the Name parameter value.
  • Set the VDDK option for the Type parameter.
  • Set the $machine variable as the Objects parameter value.
  • Set the $repository variable as the Repository parameter value.

Related Commands

Page updated 11/4/2024

Page content applies to build 12.2.0.334