Set-VBRJobAdvancedOptions
Short Description
Customizes advanced job settings.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
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>] |
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.
- 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.
- Deleted VMs 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.
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 | Accept |
---|---|---|---|---|---|
Job | Specifies the array of jobs. The cmdlet will modify advanced options of these jobs. | True | Named | True (ByValue, | False |
EnableIntegrityChecks | Indicates that the job will use the automatic backup integrity check. | False | Named | False | False |
RetainDays | Specifies the number of days to keep backup data for deleted VMs. Default: 14 days. NOTE: You cannot enable the retention policy for deleted VMs with Veeam PowerShell. To learn how to do this in Veeam Backup & Replication console, see the Retention Policy for Deleted VMs section in user guide. | False | Named | False | False |
Enabled | Indicates that the job will execute a user-defined command after the job. Use the CommandLine parameter to set the command. Schedule the command to run periodically with the Periodicity and Frequency parameters, or on specific days with the Days parameter. | False | Named | False | False |
CommandLine | Specifies the command you want to execute after the job. | False | Named | False | False |
EnablePreScript | Indicates that the job will execute a user script before the job starts. Use the PreJobScript parameter to specify the script. | False | Named | False | False |
PreJobScript | Specifies the script you want to run before job. | False | Named | False | False |
Periodicity | For command schedule. Specifies the command schedule type:
| False | Named | False | False |
Frequency | For command cycle schedule. Specifies the number of the backup cycles after which the command will be executed (for example, every 3 backup cycle). | False | Named | False | False |
Days | For command schedule on days. Specifies the days to run the command: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. | 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 edits advanced job settings to backup job named "Backup Job 01":
- The integrity check is enabled.
- The data retention period is changed to 30 days.
The job is obtained with Get-VBRJob and piped down.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks $True -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.
Get-VBRJob -Name "Backup Job 01" | Set-VBRJobAdvancedOptions -EnableIntegrityChecks $True -Enabled $True -CommandLine "report.exe" -Periodicity Cycles -Frequency 5 |
Related Commands