Maintain control of your Microsoft 365 data
Post Reply
pbleysva
Lurker
Posts: 2
Liked: never
Joined: Aug 01, 2025 8:13 am
Contact:

[Feature Request] Job Design Templates and Job Design Automation

Post by pbleysva »

As we see more and more companies adopting a cloud-first strategy and the volume of data in Microsoft 365 continues to grow, having well-designed Veeam M365 backup jobs becomes increasingly important. I would appreciate more documentation and templates from Veeam to support daily administration.

At the moment, the solution often feels like a workaround—especially when addressing performance issues related to M365 SharePoint backups. For example, SharePoint data cannot be backed up successfully within a reasonable timeframe using a single job. Each time, we end up creating a custom solution for the specific case.


SVA Custom Script Version with Pattern Recognition:

Code: Select all

# Version 15.04.2025

#@@ -0,0 +1,72 @@
 <# 
 .NAME
     Veeam Backup for Microsoft Office 365 Dynamic SP Jobs
 .SYNOPSIS
     Script to use for automatically adding SharePoint Sites to a backup job
 .DESCRIPTION
     Script to use for dynamically creating and adding SharePoint Sites to a backup job based upon the first letter of the site name
     Schedule with task manager to run daily to capture new sites
     Created for Veeam Backup for Microsoft Office 365 v4
     Released under the MIT license.
 .LINK

     https://github.com/tsmithco

 Customized and Extended by SVA David Hillen & Phillip Bley
 #>
 
 <# 
 .INSTRUCTIONS
     Modify the repository name in the script to the desired target repository name.
     Run the script daily via task scheduler.
 #>
 
 
 #Import the VBO PS module
 Import-Module "C:\Program Files\Veeam\Backup365\Veeam.Archiver.PowerShell\Veeam.Archiver.PowerShell.psd1"
 
 #connect to the organization (assuming 1 org)
 $Org = Get-VBOOrganization 
 
 
 #Modify the target repository name below
 $repo = Get-VBOrepository -name "REPO_NAME"
 
 #Get all sites within the organization that are not personal SP sites, and that are not already in a backup job.
 $Sites = Get-VBOOrganizationSite -org $org -IncludePersonalSite:$false -NotInJob
 
 
 #Job name as a string and as integers so it can be incremented to the next letter
 $SPjob=[int[]][char[]]'SP-A'
 $letter=[char[]]$SPjob -join ""
 
 
 $i=0
 while ($i -lt 26){


 #Filter set to anything that starts with the 4th character of the job name, "A" to begin with.
 $filter = '^' + ([char[]]$SPjob[3]) 
 
 ForEach ($Site in $Sites) {

  #Pattern Recognition
	 if ($Site.Name -match "^[A-Z-]+-(.+)") {
  	    $remaining = $matches[1]
   	    Write-Output $remaining
	 }


   $FilteredSite = $remaining -match "$Filter"
 
   # Only add the sites if the filter is True
   if ($FilteredSite) {
     $newSite = New-VBOBackupItem -Site $Site
 
     #Write-Output $Site.Name

     #Attempt to create the backup job for the filtered letter if it doesn't exist.
     try{
         $job = Add-VBOJob -Organization $org -Name $letter -repo $repo -SelectedItems $newSite
         }
     #If the job exists, add the site to the existing job
     catch{
        $job = Get-VBOJob -name $letter
        Write-Output Jobname: $job
        Add-VBOBackupItem -Job $job -BackupItem $newSite
        }
   }
 }
 
 #Increment the job name's 4th character to the next letter.
     $SPjob[-1]++
     $letter=[char[]]$SPjob -join ""
 
     $i++
 
 }

 $LastSites = Get-VBOOrganizationSite -org $org -IncludePersonalSite:$false -NotInJob

 ForEach ($Site in $LastSites) {
    $newSite = New-VBOBackupItem -Site $Site
 
     #Write-Output $Site.Name

     #Attempt to create the backup job for the filtered letter if it doesn't exist.
     try{
         $job = Add-VBOJob -Organization $org -Name "SP-Sammeljob" -repo $repo -SelectedItems $newSite
         }
     #If the job exists, add the site to the existing job
     catch{
        $job = Get-VBOJob -name "SP-Sammeljob"
        Add-VBOBackupItem -Job $job -BackupItem $newSite
        }
 }
Vanilla Script form Github:

Code: Select all

@@ -0,0 +1,72 @@
 <# 
 .NAME
     Veeam Backup for Microsoft Office 365 Dynamic SP Jobs
 .SYNOPSIS
     Script to use for automatically adding SharePoint Sites to a backup job
 .DESCRIPTION
     Script to use for dynamically creating and adding SharePoint Sites to a backup job based upon the first letter of the site name
     Schedule with task manager to run daily to capture new sites
     Created for Veeam Backup for Microsoft Office 365 v4
     Released under the MIT license.
 .LINK
     https://github.com/tsmithco
 #>
 
 <# 
 .INSTRUCTIONS
     Modify the repository name in the script to the desired target repository name.
     Run the script daily via task scheduler.
 #>
 
 
 #Import the VBO PS module
 Import-Module "C:\Program Files\Veeam\Backup365\Veeam.Archiver.PowerShell\Veeam.Archiver.PowerShell.psd1"
 
 #connect to the organization (assuming 1 org)
 $Org = Get-VBOOrganization 
 
 
 #Modify the target repository name below
 $repo = Get-VBOrepository -name "REPO_NAME"
 
 #Get all sites within the organization that are not personal SP sites, and that are not already in a backup job.
 $Sites = Get-VBOOrganizationSite -org $org -IncludePersonalSite:$false -NotInJob
 
 
 #Job name as a string and as integers so it can be incremented to the next letter
 $SPjob=[int[]][char[]]'SP-A'
 $letter=[char[]]$SPjob -join ""
 
 
 $i=0
 while ($i -lt 26){
 
 #Filter set to anything that starts with the 3rd character of the job name, "A" to begin with.
 $filter = '^' + ([char[]]$SPjob[3])
 
 ForEach ($Site in $Sites) {
   $FilteredSite = $Site.Name -match "$Filter"
 
   # Only add the sites if the filter is True
   if ($FilteredSite) {
     $newSite = New-VBOBackupItem -Site $Site
 
     #Attempt to create the backup job for the filtered letter if it doesn't exist.
     try{
         $job = Add-VBOJob -Organization $org -Name $letter -repo $repo -SelectedItems $newSite
         }
     #If the job exists, add the site to the existing job
     catch{
        $job = Get-VBOJob -name $letter
        Add-VBOBackupItem -Job $Job -BackupItem $newSite
        }
   }
 }
 
 #Increment the job name's 4th  (hier für uns 11ter) character to the next letter.
     $SPjob[-1]++
     $letter=[char[]]$SPjob -join ""
 
     $i++
 
 }
Polina
Veeam Software
Posts: 3582
Liked: 855 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: [Feature Request] Job Design Templates and Job Design Automation

Post by Polina »

Hi pbleysva,

I'm afraid we will never be able to provide the templates you're looking for. Instead, we’re focusing on product scalability for processing of larger datasets, including SharePoint. In v8, we introduced proxy pools which enable additional resources to be added as needed. With this, for example, you can dedicate multiple proxies to protect your sites more efficiently. Have you had a chance to try it?
pbleysva
Lurker
Posts: 2
Liked: never
Joined: Aug 01, 2025 8:13 am
Contact:

Re: [Feature Request] Job Design Templates and Job Design Automation

Post by pbleysva »

Hi Polina, if I have a performant proxy pool available, would it be possible to include all SharePoint sites in a single backup job?

When using Veeam Data Cloud for Microsoft 365, is it technically possible to include all SharePoint sites in a single backup job without performance issues, or would you recommend splitting them into multiple jobs?
Polina
Veeam Software
Posts: 3582
Liked: 855 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: [Feature Request] Job Design Templates and Job Design Automation

Post by Polina »

Technically, it's indeed possible. You can add up to 100 proxies to a single pool, and sites within a sigle job pointed to such a pool will be distributed between multiple proxies. Note, though, that throttling likely will still impact backups.

Distributing sites between smaller jobs would be more a business than a technical decision. For instance, if some sites should get protected with a priority, separating them to a dedicated job will allow to get a restore point faster compared to a all-sites-in-tenant job.
Post Reply

Who is online

Users browsing this forum: jfrobs, raftbone and 5 guests