Maintain control of your Microsoft Office 365 email data
mattbrown80
Service Provider
Posts: 15
Liked: 4 times
Joined: Nov 26, 2014 9:34 pm
Full Name: Matt Brown
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by mattbrown80 » Nov 15, 2018 7:48 pm

Thank you for your response Niel - this works for our requirement.

vmniels
Veeam Software
Posts: 2227
Liked: 484 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by vmniels » Nov 15, 2018 7:59 pm

In regards to the script; due to travel I haven't been able to finish it. I am working on it and hope to have something early next week.
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

vmniels
Veeam Software
Posts: 2227
Liked: 484 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by vmniels » Nov 21, 2018 8:46 am 2 people like this post

The following script should achieve what is needed. It will get all the SharePoint sites except for the personal sites and add these to an existing job. It will ignore Sites which are already in a job and only get the newly discovered ones.

Just replace your organization name and backup job and it should be good. Please test it before putting this in a Windows task which can run every X minutes.

Code: Select all

Import-Module "C:\Program Files\Veeam\Backup365\Veeam.Archiver.PowerShell\Veeam.Archiver.PowerShell.psd1"

# Get the Organization
$Org = Get-VBOOrganization -Name "yourorganization.onmicrosoft.com"
# Leverage the Job which backs up the required sites
$Job = Get-VBOJob -Name "BACKUPJOBNAME"
# Get all the SharePoint Sites which aren't in a job but exclude the Personal Sites
$Sites = Get-VBOOrganizationSite -Organization $Org -IncludePersonalSite:$false -NotInJob

ForEach ($Site in $Sites) {
  #Write-Progress -Activity "Parsing sites" -status "Site: $Sites.Name" -percentComplete ($i / $Sites.count * 100)
  $newSite = New-VBOBackupItem -Site $Site
  Add-VBOBackupItem -Job $Job -BackupItem $newSite
}

Write-Host "Added a total of " $Sites.count " sites to the job"
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

AlexB82
Enthusiast
Posts: 31
Liked: 1 time
Joined: May 01, 2018 2:06 pm
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by AlexB82 » Nov 21, 2018 1:01 pm

Script works perfectly - Thanks so much for providing !!

vipthomps
Service Provider
Posts: 44
Liked: 3 times
Joined: Dec 06, 2010 7:51 pm
Full Name: Eric Thompson
Location: Boston, MA
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by vipthomps » Nov 21, 2018 3:53 pm 2 people like this post

Looks great! thanks. I added some logging and scheduled it in task manager

Start-transcript -path C:\<PATH><Filename.LOG> -append
get-date -format g
Write-Host "Added a total of " $Sites.count " sites to the job"
Stop-transcript

k.klutke
Novice
Posts: 4
Liked: 2 times
Joined: Nov 23, 2018 1:52 am
Full Name: Kris Klutke
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by k.klutke » Feb 06, 2019 10:18 pm

I ended up finding this thread after Veeam support suggested I post a feature request. I was in the exact same scenario as @AlexB82, I needed to backup all Sites but exclude Personal Sites - Without having to manually maintain(update) the job.

Thank you @vmniels for the PowerShell script, it works perfectly.

Can this thread be renamed to include "Feature Request" so hopefully, one day this because a normal feature?

vmniels
Veeam Software
Posts: 2227
Liked: 484 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by vmniels » Feb 06, 2019 11:30 pm 1 person likes this post

It is currently already being tracked as a feature request and will be added in a future release.
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

jandrewartha
Influencer
Posts: 15
Liked: 1 time
Joined: Feb 13, 2017 1:49 am
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by jandrewartha » Feb 17, 2019 4:23 pm

I currently have a single job that backs up email/archive/onedrive/sites, and due to the time taken to backup onedrive I want to split it into two separate jobs. Is there a way I can do this and not have to download everything again? I'm happy (indeed wanting) to move onedrive to a separate repository.

vmniels
Veeam Software
Posts: 2227
Liked: 484 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Separate Jobs for Exchange/SharePoint/OneDrive

Post by vmniels » Feb 17, 2019 4:29 pm

You can use powershell to move data between repositories via https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=20
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest