Add-VBOCopyJob

Short Description

Creates backup copy jobs.

Syntax

Add-VBOCopyJob -Repository <VBORepository> -BackupJob <VBOJob> [-SchedulePolicy <VBOCopyJobSchedulePolicy>] [<CommonParameters>]

Detailed Description

This cmdlet creates a backup copy job that will protect backups created by Veeam Backup for Microsoft 365 using the specified backup job. The backup copy job will copy backed-up data to a backup repository extended with one of the following cloud-based or on-premises object storage:

  • Azure Blob Storage Hot access tier
  • Azure Blob Storage Cool access tier
  • Azure Blob Storage Archive access tier
  • Amazon S3 Standard storage class
  • Amazon S3 Standard-Infrequent Access storage class
  • all Amazon S3 Glacier storage classes
  • S3 Compatible object storage (if applicable)

Add-VBOCopyJob Note

Before creating a backup copy job, make sure you are familiar with the following restrictions:

  • Only one backup copy job can be created per backup job.
  • An extended backup repository where you keep your backups and a backup repository where you will store backup copies must be located on the same backup proxy server and have the same retention type.
  • Object storage with the enabled immutability can be selected only as a target for backup copy jobs.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Accept Wildcard Characters

BackupJob

Specifies a backup job for which you want to create backup copies.

Accepts the VBOJob object.

To get this object, run the Get-VBOJob cmdlet.

True

Named

False

False

Repository

Specifies a backup repository extended with object storage. Veeam Backup for Microsoft 365 will copy backed-up data to this repository.

Accepts the VBORepository object.

To get this object, run the Get-VBORepository cmdlet.

True

Named

False

False

SchedulePolicy

Specifies schedule settings for a backup copy job.

Default: Immediate

Accepts the VBOCopyJobSchedulePolicy object.

To create this object, run the New-VBOCopyJobSchedulePolicy cmdlet.

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.

Output Object

The cmdlet returns the VBOCopyJob object that contains settings for a backup copy job.

Examples

Add-VBOCopyJobExample 1. Creating Backup Copy Job

This example shows how to create a backup copy job for the backup job with the name ABC Backup.

$job = Get-VBOJob -Name "ABC Backup"

$repository = Get-VBORepository -Name "Azure Archive repository"

Add-VBOCopyJob -Repository $repository -BackupJob $job

Perform the following steps:

  1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
  2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  3. Run the Add-VBOCopyJob cmdlet. Set the $job variable as the BackupJob parameter value and the $repository variable as the Repository parameter value.

The cmdlet output will contain the following details on the backup copy job: Id, Name, Description, Repository, BackupJob, SchedulePolicy, IsEnabled, LastStatus, LastRun and NextRun.

Add-VBOCopyJobExample 2. Creating Backup Copy Job and Setting Schedule

This example shows how to create a backup copy job for the backup job with the name ABC Backup and configure a backup copy job schedule. A backup copy job schedule will have the following settings:

  • A backup copy job will run everyday at 10 AM.
  • A backup copy job will stop if its processing exceeds the allowed backup window.

$job = Get-VBOJob -Name "ABC Backup"

$repository = Get-VBORepository -Name "Azure Archive repository"

$bwindow = New-VBOBackupWindowSettings -FromDay Monday -FromHour 8 -ToDay Sunday -ToHour 17 -Enabled

$daily = New-VBOCopyJobSchedulePolicy -Type Daily -DailyType Everyday -DailyTime 10:00:00 -BackupWindowSettings $bwindow

Add-VBOCopyJob -Repository $repository -BackupJob $job -SchedulePolicy $daily

Perform the following steps:

  1. Run the Get-VBOJob cmdlet. Specify the Name parameter value. Save the result to the $job variable.
  2. Run the Get-VBORepository cmdlet. Specify the Name parameter value. Save the result to the $repository variable.
  3. Run the New-VBOBackupWindowSettings cmdlet to create a backup window within which the backup copy job must be completed. Save the result to the $bwindow variable.
  4. Run the New-VBOCopyJobSchedulePolicy cmdlet with the $bwindow variable to set the job schedule. Save the result to the $daily variable.
  5. Run the Add-VBOCopyJob cmdlet. Specify the following settings:
  • Set the $job variable as the BackupJob parameter value.
  • Set the $repository variable as the Repository parameter value.
  • Set the $daily variable as the SchedulePolicy parameter value.

The cmdlet output will contain the following details on the backup copy job: Id, Name, Description, Repository, BackupJob, SchedulePolicy, IsEnabled, LastStatus, LastRun and NextRun.

Related Commands