Bulk creation of Veeam Backup Jobs


I needed to make 50+ backup jobs in a Veeam environment and decided to create a PowerShell script to automate this repetitive work. Please find below the script I made to set most of the options within a Veeam backup job. The scripts accepts to parameters: the backup location (e.g. d:\backups) and the backup job name.

# *****************************************************
# This script creates a basic backup job
# Usage  : createbackup <backup job location> <backup job name>
# Author : Ted Steenvoorden
# Version: 1.0
# Date   : 18-10-2011

# *****************************************************

$vbrserver = Get-VBRServer | Where {$_.Type -eq “Local”}
$vbrjobname = $args[1]
$vbrfolder = $args[0]
$vbrobjects = “server1”

Add-VBRBackupJob -Name $vbrjobname -Type VDDK -Server $vbrserver -Folder $vbrfolder -Objects $vbrobjects

# Set Job options

$job = Get-VBRJob | where {$_.name -eq $vbrjobname}
$options = Get-VBRJobOptions $job
$options.VDDKMode = “san”
$options.FailoverToNetworkMode = $false
$options.Algorithm = “Syntethic”
$options.RunManually = $false
Set-VBRJobOptions -job $job -options $options

# Set Job VSS options

$vssoptions = Get-VBRJobVSSOptions $job
$Credentials = New-Object -TypeName Veeam.Backup.Common.CCredentials -ArgumentList “username”,”password”,0,0
$vssoptions.Credentials = $Credentials
$vssoptions.Enabled = $true
Set-VBRJobVSSOptions -job $job -options $vssoptions

# Set Job scheduling options

$schedule = Get-VBRJobScheduleOptions $job
$schedule.OptionsDaily.Enabled = $true
$schedule.OptionsDaily.Kind = “SelectedDays”
$schedule.OptionsDaily.Time = “19:30:00”
$schedule.RetryTimes = “1”
Set-VBRJobScheduleOptions -Job $job -Options $schedule

One Response to Bulk creation of Veeam Backup Jobs

  1. habibalby says:

    Is there an option to exclude SCSI controllers? like I want only SCSI 0:0 and the reset to be excluded.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: