Maintain control of your Microsoft 365 data
Post Reply
doublem
Enthusiast
Posts: 26
Liked: 7 times
Joined: Jul 01, 2016 4:07 pm
Contact:

Selecting Teams for backup

Post by doublem »

Hi,

We have about 800 Teams and the basics of backing them up (and restore) is working (tested with ~5 Teams as a "poc").

The problem is selecting the Teams to backup. We want to backup about 100-200 of the ~800 Teams. New Teams are added and removed many times a week.
How can we do the selection without selecting the Teams one-by-one?

We must be able to use a group or something with a list of Teams we want to backup. But I have not managed to configure this.
Polina
Veeam Software
Posts: 2939
Liked: 681 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Selecting Teams for backup

Post by Polina »

Hi doublem,

Today, PowerShell scripting is the only way to achieve it. O365 doesn't provide any grouping for teams and neither it's available within VBO365.
doublem
Enthusiast
Posts: 26
Liked: 7 times
Joined: Jul 01, 2016 4:07 pm
Contact:

Re: Selecting Teams for backup

Post by doublem »

Thanks for letting me know.

1)
Please see this as a "Request for Enhancement". I believe this a important part of the backup process.

2)
Are there any examples/powershell-code that I can use as a start for implementing this

/Regards
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Selecting Teams for backup

Post by Mike Resseler » 1 person likes this post

You should be able to find good ones here: https://github.com/nielsengelen/veeam-p ... ter/VBO365
doublem
Enthusiast
Posts: 26
Liked: 7 times
Joined: Jul 01, 2016 4:07 pm
Contact:

Re: Selecting Teams for backup

Post by doublem » 1 person likes this post

Inspired by the code from link above (thanks "nielsengelen") I came up with this code. Executed daily before backup job starts.

Code: Select all

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

$Org = Get-VBOOrganization -Name "sometenant.onmicrosoft.com"
$Job = Get-VBOJob -Name "Backup daily - Teams"

# Remove all items from job (except "XX". Job must contain at least one item!)
$allItems = Get-VBOBackupItem -job $job | where Team -NotLike "XX"
foreach ($item in $allItems) {
	Remove-VBOBackupItem -Job $job -BackupItem $item
}

# Get all Teams in Organization
$allTeams = Get-VBOOrganizationTeam -Organization $org

# Add Teams to job excluding "CommonPrefix_*"
foreach ($team in $allTeams) {
	if ( $team.displayName -notlike "CommonPrefix_*" ) {
		$item = New-VBOBackupItem -Team $team
		Add-VBOBackupItem -Job $Job -BackupItem $item
	}
}
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Selecting Teams for backup

Post by Mike Resseler »

Thanks for sharing it here @doublem
aheath
Influencer
Posts: 13
Liked: never
Joined: May 09, 2019 1:56 pm
Full Name: Ashley Heath
Contact:

Re: Selecting Teams for backup

Post by aheath »

Hi doublem, this is something I am looking in to as well, could I ask the reason for removing all items from the job and then re-adding them?
Thanks
doublem
Enthusiast
Posts: 26
Liked: 7 times
Joined: Jul 01, 2016 4:07 pm
Contact:

Re: Selecting Teams for backup

Post by doublem »

If I remember correctly...
It is to avoid errors when teams are removed from O365. This was a simple method.

We have used this for a long time now and it is working as expected.
Post Reply

Who is online

Users browsing this forum: Ilya and 17 guests