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

Set-VBRComputerBackupJob

Short Description

Modifies Veeam Agent backup jobs.

Applies to

Product Edition: Community, Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRComputerBackupJob -Job <VBRComputerBackupJob> [-Name <string>] [-Description <string>] [-BackupObject <Object[]>] [-BackupType <VBRComputerBackupJobBackupType> {EntireComputer | SelectedFiles | SelectedVolumes}][-SelectedFilesOptions <VBRSelectedFilesBackupOptions>]
[-SelectedVolumes <string[]>] [-IncludeUsbDrives][-DestinationOptions <VBRComputerDestinationOptions>] [-BackupRepository <CBackupRepository>]
[-RetentionPolicy <int>] [-StorageOptions <VBRStorageOptions>][-SyntheticFullOptions <VBRSyntheticFullOptions>] [-ActiveFullOptions <VBRFullBackupOptions>] [-HealthCheckOptions <VBRFullBackupOptions>][-CompactFullOptions <VBRFullBackupOptions>][-NotificationOptions <VBRNotificationOptions>] [-ScriptOptions <VBRJobScriptOptions>][-EnableDeletedComputerRetention] [-DeletedComputerRetentionPolicy <int>]
[-EnableApplicationProcessing][-ApplicationProcessingOptions <VBRApplicationProcessingOptions[]>] [-EnableIndexing] [-IndexingOptions <VBRComputerIndexingOptions[]>][-EnableSchedule] [-ScheduleOptions <VBRObject>] [<CommonParameters>]

Detailed Description

This cmdlet modifies settings of Veeam Agent backup jobs. To modify settings, enter the necessary parameters with new values. The parameters that you omit will remain unchanged.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Job

Specifies the Veeam Agent backup job that you want to modify.

Accepts the VBRComputerBackupJob variable.

True

Named

True (ByValue)

 

Name

Specifies the name that you want to assign to the Veeam Agent backup job.

False

Named

False

 

Description

Specifies the description of the Veeam Agent backup job.

False

Named

False

 

BackupObject

Specifies an array of protection groups and discovered computers that you want to add to the Veeam Agent backup job.

Accepts the VBRDiscoveredEntityType and VBRProtectionGroup[] types.

IMPORTANT! The cmdlet will replace the protection groups currently added to the backup job with this array.

False

Named

False

 

BackupType

Specifies the scope of data that you want to back up.

  • EntireComputer: for entire computer image backups.
  • SelectedFiles: for file-level backups.
    NOTE:
    This option is not available for the job that backs up failover clusters.
    If you select this option, you will not be able to switch to the EntireComputer or SelectedVolumes options.
  • SelectedVolumes: for volume-level backups.

False

Named

False

 

SelectedFiles
Options

For file-level backups.

Specifies an array of the folders with the files that you want to back up.

Accepts the VBRSelectedFilesBackupOptions type.

False

Named

False

 

SelectedVolumes

For volume-level backups.

Specifies an array of computer volumes that you want to back up.

Accepts the following types:

  • IVBRSelectedVolume[]
    NOTE: You can set this type for Windows-based computers only.
  • VBRLinuxSelectedVolume
    NOTE: You can set this type for Linux-based computers only.

False

Named

False

 

IncludeUsbDrives

Indicates that Veeam Backup & Replication will back up the periodically connected USB drives.

NOTE: You can set this parameter only for Veeam Agent jobs that back up entire images of Windows computers.

False

Named

False

 

DestinationOptions

Specifies the target backup location for the protected computers that you want to add to the backup policy.

NOTE: This parameter is not available for Veeam Agent backup jobs.

Accepts the VBRComputerDestinationOptions type.

False

Named

False

 

BackupRepository

Specifies the target backup location for the Veeam Agent backup job.

NOTE: This parameter is not available for backup policies.

Accepts the CBackupRepository type.

False

Named

False

 

RetentionPolicy

Specifies the retention policy for the backups created by the Veeam Agent backup job.

NOTE: Retention policy specifies the following settings:

  • For jobs that back up workstations the retention policy specifies the number of days.
  • For jobs that back up Linux computes the retention policy specifies the number of restore points.
  • For jobs that back up servers, the retention policy specifies the number of restore points.

False

Named

False

 

SyntheticFull
Options

Specifies the schedule for synthetic full backup.

Accepts the VBRSyntheticFullOptions type.

False

Named

False

 

ActiveFull
Options

Specifies the schedule for active full backup.

Accepts the VBRFullBackupOptions type.

False

Named

False

 

HealthCheck
Options

Specifies the health check schedule for the latest restore point.

Accepts the VBRFullBackupOptions type.

NOTE: This parameter is not available for backup policies that Veeam Agent job applies to Linux computers.

False

Named

False

 

EnableDeleted
ComputerRetention

Indicates that Veeam Backup & Replication will keep the backup data for machines that have not been backed up for a certain period of time. Veeam Backup & Replication will remove backup files of these computers in case Veeam Agent backup job will not be able to back up these computers for the specified period.

Use the DeletedComputerRetentionPolicy parameter to specify the number of days for keeping the backup files of machines that have not been backed up for a certain period of time.

False

Named

False

 

DeletedComputer
RetentionPolicy

For the EnableDeletedComputerRetention option.

Specifies the period of time in days to keep backup files for machines that have not been backed up for a certain period of time. Veeam Backup & Replication will remove backup files of these computers in case Veeam Agent backup job will not be able to back up these computers when the specified period of time is over.

Default: 14 days.

False

Named

False

 

CompactFull
Options

Specifies the schedule for the compact operation of full backups created by the Veeam Agent backup job.

Accepts the VBRFullBackupOptions type.

Veeam Backup & Replication will defragment and compact a full backup per the schedule settings specified in the VBRFullBackupOptions object.

NOTE: This parameter is not available for backup policies that Veeam Agent job applies to Linux computers.

False

Named

False

 

StorageOptions

Specifies the settings for compression and storage optimization of the target backup repository.

Accepts the VBRStorageOptions type.

False

Named

False

 

NotificationOptions

Specifies notification settings for the Veeam Agent backup job.

Accepts the VBRNotificationOptions type.

False

Named

False

 

ScriptOptions

Specifies custom script settings. Veeam Backup & Replication will run pre-job and post-job scripts per these settings.

NOTE: This parameter is not available for backup policies that Veeam Agent job applies to Windows computers.

Accepts the VBRJobScriptOptions type.

False

Named

False

 

EnableApplication
Processing

Enables application-aware processing for the Veeam Agent backup job.

False

Named

False

 

Application
Processing
Options

Specifies the settings for application-aware processing.

Accepts the VBRApplicationProcessingOptions type.

False

Named

False

 

EnableIndexing

Indicates that the guest file system indexing is enabled.

False

Named

False

 

IndexingOptions

Specifies indexing scope settings.

Accepts the VBRComputerIndexingOptions type.

False

Named

False

 

EnableSchedule

Indicates that Veeam Backup & Replication will schedule the Veeam Agent backup job to run on a regular basis.

False

Named

False

 

ScheduleOptions

Specifies the settings for Veeam Agent job schedule

Accepts the types returned by the following cmdlets:

False

Named

False

 

UseSnapshotless
FileLevelBackup

Indicates that the cmdlet will create the crash-consistent file-level backup without a snapshot.

NOTE: Available for Linux machines with the file-level backup scope only.

False

Named

False

 

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

Return Type

Example 1

This example shows how to apply new storage settings to an existing Veeam Agent backup job.

  1. Run Get-VBRJob to get the job that you want to modify. Save the result to the $job variable.
  2. Run New-VBRStorageOptions to specify compression and storage optimization settings. Save the result to the $storage variable.
  3. Run Set-VBRComputerBackupJob with the $job and $storage variables.

$job = Get-VBRJob -name "ClusterJob"

$storage = New-VBRStorageOptions -CompressionLevel Optimal -StorageOptimizationType LocalTarget

Set-VBRComputerBackupJob -Job $job -StorageOptions $storage

Example 2

This example shows how to modify an existing Veeam Agent backup job. The job will run with the following settings:

  • The job will create a full backup on a regular basis.
  • Veeam Backup & Replication will apply the retention policy for the backups created by the job.

To modify an existing Veeam Agent backup job, perform the following steps:

  1. Run Get-VBRJob to get the job that you want to modify. Save the result to the $job variable.
  2. Run New-VBRFullBackupOptions to specify the full backup job schedule. Save the result to the $fulloptions variable.
  3. Run Set-VBRComputerBackupJob with the $job and $fulloptions variables. Use the RetentionPolicy parameter to specify the retention period.

$job = Get-VBRJob -name "LinuxJob"

$fulloptions = New-VBRFullBackupOptions -Enable -ScheduleType Weekly -SelectedDays Sunday, Wednesday

Set-VBRComputerBackupJob -Job $job -CompactFullOptions $fulloptions -RetentionPolicy 7

Example 3

This example shows how to add a protection group to an existing Veeam Agent backup job.

  1. Run Get-VBRJob to get the backup job that you want to modify. Save the result to the $job variable.
  2. Cast the $job variable to the VBRComputerBackupJob type. Use the [Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob]$ComputerBackupJob value.
  3. Get the protection group scope. Use the BackupObject property of the backup job object to get an array. Save the result to the $objects variable.
  4. Run Get-VBRProtectionGroup to get the protection group that you want to add. Save the result to the $group variable.
  5. Add the protection group to the BackupObject array. Use the += operator.
  6. Run Set-VBRComputerBackupJob with the $job and $objects variables.

$job = Get-VBRJob -name "BackupJob"

[Veeam.Backup.PowerShell.Infos.VBRComputerBackupJob]$ComputerBackupJob=$job

$objects = $ComputerBackupjob.BackupObject

$group = Get-VBRProtectionGroup -Name "Protection group"

$objects += $group

Set-VBRComputerBackupJob -Job $job -BackupObject $objects

Related Commands

Get-VBRJob

New-VBRStorageOptions

New-VBRFullBackupOptions

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Veeam Availability for Nutanix AHV Documentation

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation