This is an archive version of the document. To get the most up-to-date information, see the current version.

Set-VBRJobAdvancedOptions

Short Description

Customizes advanced job settings.

Applies to

Platform: VMware, Hyper-V

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

Set-VBRJobAdvancedOptions -Job <CBackupJob[]> [-Periodicity <CDomJobScriptCommand+PeriodicityType>] [-Frequency <UInt32>] [-Enabled [<Boolean>]] [-Days <DayOfWeek[]>] [-CommandLine <String>] [-EnablePreScript [<Boolean>]] [-PreJobScript <String>] [-EnableIntegrityChecks [<Boolean>]] [-RetainDays <Int32>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Related Commands

Get-VBRJob

Detailed Description

This cmdlet sets advanced options for the selected job.

You can set:

  • Integrity check: Veeam Backup and Replication will check every full backup file for integrity and recovery availability.
  • Custom data retention period: if a VM included in this job is deleted, its data will be stored for the specified period. When this period ends, the backup files are deleted. The default period is 14 days.
  • Post job activity: you can specify a command you want to run after the job run, i.e. to sent a job result report. You can schedule this command to run i.e. every second job run or on specific days.

Read more about advanced job settings in Veeam Backup & Replication user guide at http://www.veeam.com/vmware-backup/help-center.

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Job

Specifies the job you want to edit.

You can assign multiple jobs to this object.

True

Named

True (ByValue,
ByProperty
Name)

False

Enable
Integrity
Checks

If set to TRUE, automatic backup integrity check will be enabled. Integrity check process verifies the full backup file integrity to avoid data corruption. Otherwise integrity check in not performed.

Default: TRUE.

False

Named

False

False

RetainDays

Specifies the integer setting the number of days to keep backup data for deleted VMs. If ommited, the data retention period will be set to 14 days by default.

False

Named

False

False

Enabled

Used to execute a user-defined command after the job run.

If set to TRUE, the command set in CommandLine will be executed after the job run.

You need to schedule the command run periodically with the Periodicity and Frequency parameters, or on specific days with the Days parameter.

False

Named

False

False

Command
Line

Used to execute a user-defined command after the job run.

Specifies the command you want to execute after the job run. You can schedule the command run periodically with the Periodicity and Frequency parameters, or on specific days with the Days parameter.

Set the Enable parameter to TRUE to enable the command execution.

False

Named

False

False

EnablePreScript

Indicates that a custom script must be run before the job. Use the PreJobScript parameter to specify the script.

 

 

 

 

PreJobScript

Used to specify the script you want to run before job for the EnablePreJobScript parameter.

 

 

 

 

Periodicity

Used to set command run schedule.

Specifies the command run schedule type:

Cycles: the command will be executed in periods set with -Frequency parameter,

Days: the command will be executed on the days specified with -Days parameter.

False

Named

False

False

Frequency

Used to set command run schedule to Cycle.

Specifies the integer setting the number of the backup job runs after which the command will be executed.

To set the command run to cycle run, set the Periodicity parameter to Cycle.

You can also set the daily schedule with the Days parameter.

False

Named

False

False

Days

Used to set command run schedule to Days.

Specifies the days to run the command: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.

You can also set the cycle schedule with the Frequency parameter.

False

Named

False

False

<CommonParameters>

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

Example 1

This command edits advanced job settings to backup job named "Backup Job 01":

  • The integrity check is enabled.
  • The data retention period is set to 30 days.

The job is obtained with Get-VBRJob and piped down.

PS C:\PS> Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks -RetainDays 30

Example 2

This command edits advanced job settings to backup job named "Backup Job 01":

  • The integrity check is enabled.
  • The data retention is not set to leave the default settings.
  • The post job activity is enabled to run the "report.exe" command periodically after every fifth job run.

The job is obtained with Get-VBRJob and piped down.

PS C:\PS> Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks -Enabled -CommandLine "report.exe" -Periodicity Cycles  -Frequency 5